MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / HasUserXattrChanged

Function HasUserXattrChanged

db/document.go:654–662  ·  view source on GitHub ↗
(userXattr []byte, prevUserXattrHash string)

Source from the content-addressed store, hash-verified

652}
653
654func HasUserXattrChanged(userXattr []byte, prevUserXattrHash string) bool {
655 // If hash is empty but userXattr is not empty an xattr has been added. Import
656 if prevUserXattrHash == "" && len(userXattr) > 0 {
657 return true
658 }
659
660 // Otherwise check hash value
661 return userXattrCrc32cHash(userXattr) != prevUserXattrHash
662}
663
664// CVEqual returns true if the provided CV does not match _sync.rev.ver and _sync.rev.src. The caller is responsible for testing if the values are non-empty.
665func (s *SyncData) CVEqual(cv Version) bool {

Callers 2

IsSGWriteMethod · 0.85
IsSGWriteMethod · 0.85

Calls 1

userXattrCrc32cHashFunction · 0.85

Tested by

no test coverage detected