Skip to content

Commit

Permalink
CBG-3808: vrs -> ver to match XDCR format (#6723)
Browse files Browse the repository at this point in the history
  • Loading branch information
gregns1 authored and bbrks committed Apr 16, 2024
1 parent e7e5142 commit cc4366d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion channels/log_entry.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func (channelMap ChannelMap) KeySet() []string {
type RevAndVersion struct {
RevTreeID string `json:"rev,omitempty"`
CurrentSource string `json:"src,omitempty"`
CurrentVersion string `json:"vrs,omitempty"` // String representation of version
CurrentVersion string `json:"ver,omitempty"` // String representation of version
}

// RevAndVersionJSON aliases RevAndVersion to support conditional unmarshalling from either string (revTreeID) or
Expand Down
4 changes: 2 additions & 2 deletions db/crud.go
Original file line number Diff line number Diff line change
Expand Up @@ -2952,8 +2952,8 @@ func (db *DatabaseCollectionWithUser) CheckProposedVersion(ctx context.Context,
const (
xattrMacroCas = "cas" // SyncData.Cas
xattrMacroValueCrc32c = "value_crc32c" // SyncData.Crc32c
xattrMacroCurrentRevVersion = "rev.vrs" // SyncDataJSON.RevAndVersion.CurrentVersion
versionVectorVrsMacro = "_vv.vrs" // PersistedHybridLogicalVector.Version
xattrMacroCurrentRevVersion = "rev.ver" // SyncDataJSON.RevAndVersion.CurrentVersion
versionVectorVrsMacro = "_vv.ver" // PersistedHybridLogicalVector.Version
versionVectorCVCASMacro = "_vv.cvCas" // PersistedHybridLogicalVector.CurrentVersionCAS
)

Expand Down
2 changes: 1 addition & 1 deletion db/document_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ const doc_meta_with_vv = `{
"_vv":{
"cvCas":"0x40e2010000000000",
"src":"cb06dc003846116d9b66d2ab23887a96",
"vrs":"0x40e2010000000000",
"ver":"0x40e2010000000000",
"mv":{
"s_LhRPsa7CpjEvP5zeXTXEBA":"c0ff05d7ac059a16",
"s_NqiIe0LekFPLeX4JvTO6Iw":"1c008cd6ac059a16"
Expand Down
2 changes: 1 addition & 1 deletion db/hybrid_logical_vector.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ type HybridLogicalVector struct {
CurrentVersionCAS string `json:"cvCas,omitempty"` // current version cas (or cvCAS) stores the current CAS in little endian hex format at the time of replication
ImportCAS string `json:"importCAS,omitempty"` // Set when an import modifies the document CAS but preserves the HLV (import of a version replicated by XDCR)
SourceID string `json:"src"` // source bucket uuid in (base64 encoded format) of where this entry originated from
Version string `json:"vrs"` // current cas in little endian hex format of the current version on the version vector
Version string `json:"ver"` // current cas in little endian hex format of the current version on the version vector
MergeVersions map[string]string `json:"mv,omitempty"` // map of merge versions for fast efficient lookup
PreviousVersions map[string]string `json:"pv,omitempty"` // map of previous versions for fast efficient lookup
}
Expand Down

0 comments on commit cc4366d

Please sign in to comment.