Skip to content

Commit 481b531

Browse files
committed
Beryllium: Rename SourceAndVersion to Version / Improve HLV comments. (#6614)
* - Rename `SourceAndVersion` to just `Version`, and rename `SourceAndVersion.Version` to `Value`. - Add/Improve comments. * Update db/hybrid_logical_vector.go
1 parent 2586bf3 commit 481b531

13 files changed

+110
-97
lines changed

db/changes.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ type ChangeEntry struct {
5757
principalDoc bool // Used to indicate _user/_role docs
5858
Revoked bool `json:"revoked,omitempty"`
5959
collectionID uint32
60-
CurrentVersion *SourceAndVersion `json:"current_version,omitempty"` // the current version of the change entry
60+
CurrentVersion *Version `json:"current_version,omitempty"` // the current version of the change entry
6161
}
6262

6363
const (
@@ -486,7 +486,7 @@ func makeChangeEntry(logEntry *LogEntry, seqID SequenceID, channel channels.ID)
486486
// This allows current version to be nil in event of CV not being populated on log entry
487487
// allowing omitempty to work as expected
488488
if logEntry.SourceID != "" && logEntry.Version != 0 {
489-
change.CurrentVersion = &SourceAndVersion{SourceID: logEntry.SourceID, Version: logEntry.Version}
489+
change.CurrentVersion = &Version{SourceID: logEntry.SourceID, Value: logEntry.Version}
490490
}
491491
if logEntry.Flags&channels.Removed != 0 {
492492
change.Removed = base.SetOf(channel.Name)
@@ -1289,8 +1289,8 @@ func createChangesEntry(ctx context.Context, docid string, db *DatabaseCollectio
12891289
row.SetBranched((populatedDoc.Flags & channels.Branched) != 0)
12901290

12911291
if populatedDoc.HLV != nil {
1292-
cv := SourceAndVersion{}
1293-
cv.SourceID, cv.Version = populatedDoc.HLV.GetCurrentVersion()
1292+
cv := Version{}
1293+
cv.SourceID, cv.Value = populatedDoc.HLV.GetCurrentVersion()
12941294
row.CurrentVersion = &cv
12951295
}
12961296

db/changes_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ func TestCVPopulationOnChangeEntry(t *testing.T) {
320320

321321
assert.Equal(t, doc.ID, changes[0].ID)
322322
assert.Equal(t, bucketUUID, changes[0].CurrentVersion.SourceID)
323-
assert.Equal(t, doc.Cas, changes[0].CurrentVersion.Version)
323+
assert.Equal(t, doc.Cas, changes[0].CurrentVersion.Value)
324324
}
325325

326326
func TestDocDeletionFromChannelCoalesced(t *testing.T) {

db/crud.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -884,9 +884,9 @@ func (db *DatabaseCollectionWithUser) updateHLV(d *Document, docUpdateEvent DocU
884884
d.HLV.ImportCAS = d.Cas
885885
} else {
886886
// Otherwise this is an SDK mutation made by the local cluster that should be added to HLV.
887-
newVVEntry := SourceAndVersion{}
887+
newVVEntry := Version{}
888888
newVVEntry.SourceID = db.dbCtx.BucketUUID
889-
newVVEntry.Version = hlvExpandMacroCASValue
889+
newVVEntry.Value = hlvExpandMacroCASValue
890890
err := d.SyncData.HLV.AddVersion(newVVEntry)
891891
if err != nil {
892892
return nil, err
@@ -897,9 +897,9 @@ func (db *DatabaseCollectionWithUser) updateHLV(d *Document, docUpdateEvent DocU
897897

898898
case NewVersion, ExistingVersionWithUpdateToHLV:
899899
// add a new entry to the version vector
900-
newVVEntry := SourceAndVersion{}
900+
newVVEntry := Version{}
901901
newVVEntry.SourceID = db.dbCtx.BucketUUID
902-
newVVEntry.Version = hlvExpandMacroCASValue
902+
newVVEntry.Value = hlvExpandMacroCASValue
903903
err := d.SyncData.HLV.AddVersion(newVVEntry)
904904
if err != nil {
905905
return nil, err
@@ -1059,7 +1059,7 @@ func (db *DatabaseCollectionWithUser) Put(ctx context.Context, docid string, bod
10591059
return newRevID, doc, err
10601060
}
10611061

1062-
func (db *DatabaseCollectionWithUser) PutExistingCurrentVersion(ctx context.Context, newDoc *Document, docHLV HybridLogicalVector, existingDoc *sgbucket.BucketDocument) (doc *Document, cv *SourceAndVersion, newRevID string, err error) {
1062+
func (db *DatabaseCollectionWithUser) PutExistingCurrentVersion(ctx context.Context, newDoc *Document, docHLV HybridLogicalVector, existingDoc *sgbucket.BucketDocument) (doc *Document, cv *Version, newRevID string, err error) {
10631063
var matchRev string
10641064
if existingDoc != nil {
10651065
doc, unmarshalErr := unmarshalDocumentWithXattr(ctx, newDoc.ID, existingDoc.Body, existingDoc.Xattr, existingDoc.UserXattr, existingDoc.Cas, DocUnmarshalRev)
@@ -1146,11 +1146,11 @@ func (db *DatabaseCollectionWithUser) PutExistingCurrentVersion(ctx context.Cont
11461146

11471147
if doc != nil && doc.HLV != nil {
11481148
if cv == nil {
1149-
cv = &SourceAndVersion{}
1149+
cv = &Version{}
11501150
}
11511151
source, version := doc.HLV.GetCurrentVersion()
11521152
cv.SourceID = source
1153-
cv.Version = version
1153+
cv.Value = version
11541154
}
11551155

11561156
return doc, cv, newRevID, err
@@ -2190,7 +2190,7 @@ func (db *DatabaseCollectionWithUser) updateAndReturnDoc(ctx context.Context, do
21902190
Expiry: doc.Expiry,
21912191
Deleted: doc.History[newRevID].Deleted,
21922192
_shallowCopyBody: storedDoc.Body(ctx),
2193-
CV: &SourceAndVersion{Version: doc.HLV.Version, SourceID: doc.HLV.SourceID},
2193+
CV: &Version{Value: doc.HLV.Version, SourceID: doc.HLV.SourceID},
21942194
}
21952195

21962196
if createNewRevIDSkipped {

db/crud_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1744,7 +1744,7 @@ func TestPutExistingCurrentVersion(t *testing.T) {
17441744
require.NoError(t, err)
17451745
// assert on returned CV
17461746
assert.Equal(t, "test", cv.SourceID)
1747-
assert.Equal(t, incomingVersion, cv.Version)
1747+
assert.Equal(t, incomingVersion, cv.Value)
17481748
assert.Equal(t, []byte(`{"key1":"value2"}`), doc._rawBody)
17491749

17501750
// assert on the sync data from the above update to the doc
@@ -1851,7 +1851,7 @@ func TestPutExistingCurrentVersionWithNoExistingDoc(t *testing.T) {
18511851
assert.NotNil(t, doc)
18521852
// assert on returned CV value
18531853
assert.Equal(t, "test", cv.SourceID)
1854-
assert.Equal(t, incomingVersion, cv.Version)
1854+
assert.Equal(t, incomingVersion, cv.Value)
18551855
assert.Equal(t, []byte(`{"key1":"value2"}`), doc._rawBody)
18561856

18571857
// assert on the sync data from the above update to the doc

db/database_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,7 +1138,7 @@ func TestConflicts(t *testing.T) {
11381138
Changes: []ChangeRev{{"rev": "2-b"}, {"rev": "2-a"}},
11391139
branched: true,
11401140
collectionID: collectionID,
1141-
CurrentVersion: &SourceAndVersion{SourceID: bucketUUID, Version: fetchedDoc.Cas},
1141+
CurrentVersion: &Version{SourceID: bucketUUID, Value: fetchedDoc.Cas},
11421142
}, changes[0],
11431143
)
11441144

@@ -1174,7 +1174,7 @@ func TestConflicts(t *testing.T) {
11741174
Changes: []ChangeRev{{"rev": "2-a"}, {"rev": rev3}},
11751175
branched: true,
11761176
collectionID: collectionID,
1177-
CurrentVersion: &SourceAndVersion{SourceID: bucketUUID, Version: doc.Cas},
1177+
CurrentVersion: &Version{SourceID: bucketUUID, Value: doc.Cas},
11781178
}, changes[0])
11791179

11801180
}

db/document.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1239,14 +1239,14 @@ func (doc *Document) MarshalWithXattr() (data []byte, xdata []byte, err error) {
12391239
}
12401240

12411241
// HasCurrentVersion Compares the specified CV with the fetched documents CV, returns error on mismatch between the two
1242-
func (d *Document) HasCurrentVersion(cv SourceAndVersion) error {
1242+
func (d *Document) HasCurrentVersion(cv Version) error {
12431243
if d.HLV == nil {
12441244
return base.RedactErrorf("no HLV present in fetched doc %s", base.UD(d.ID))
12451245
}
12461246

12471247
// fetch the current version for the loaded doc and compare against the CV specified in the IDandCV key
12481248
fetchedDocSource, fetchedDocVersion := d.HLV.GetCurrentVersion()
1249-
if fetchedDocSource != cv.SourceID || fetchedDocVersion != cv.Version {
1249+
if fetchedDocSource != cv.SourceID || fetchedDocVersion != cv.Value {
12501250
return base.RedactErrorf("mismatch between specified current version and fetched document current version for doc %s", base.UD(d.ID))
12511251
}
12521252
return nil

db/hybrid_logical_vector.go

Lines changed: 32 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
package db
1010

1111
import (
12+
"encoding/base64"
1213
"fmt"
1314
"math"
1415

@@ -19,6 +20,7 @@ import (
1920
// hlvExpandMacroCASValue causes the field to be populated by CAS value by macro expansion
2021
const hlvExpandMacroCASValue = math.MaxUint64
2122

23+
// HybridLogicalVector (HLV) is a type that represents a vector of Hybrid Logical Clocks.
2224
type HybridLogicalVector struct {
2325
CurrentVersionCAS uint64 // current version cas (or cvCAS) stores the current CAS at the time of replication
2426
ImportCAS uint64 // Set when an import modifies the document CAS but preserves the HLV (import of a version replicated by XDCR)
@@ -28,19 +30,30 @@ type HybridLogicalVector struct {
2830
PreviousVersions map[string]uint64 // map of previous versions for fast efficient lookup
2931
}
3032

31-
// SourceAndVersion is a structure used to add a new entry to a HLV
32-
type SourceAndVersion struct {
33+
// Version is representative of a single entry in a HybridLogicalVector.
34+
type Version struct {
35+
// SourceID is an ID representing the source of the value (e.g. Couchbase Lite ID)
3336
SourceID string `json:"source_id"`
34-
Version uint64 `json:"version"`
37+
// Value is a Hybrid Logical Clock value (In Couchbase Server, CAS is a HLC)
38+
Value uint64 `json:"version"`
3539
}
3640

37-
func CreateVersion(source string, version uint64) SourceAndVersion {
38-
return SourceAndVersion{
41+
func CreateVersion(source string, version uint64) Version {
42+
return Version{
3943
SourceID: source,
40-
Version: version,
44+
Value: version,
4145
}
4246
}
4347

48+
// String returns a Couchbase Lite-compatible string representation of the version.
49+
func (v Version) String() string {
50+
timestamp := string(base.Uint64CASToLittleEndianHex(v.Value))
51+
source := base64.StdEncoding.EncodeToString([]byte(v.SourceID))
52+
return timestamp + "@" + source
53+
}
54+
55+
// PersistedHybridLogicalVector is the marshalled format of HybridLogicalVector.
56+
// This representation needs to be kept in sync with XDCR.
4457
type PersistedHybridLogicalVector struct {
4558
CurrentVersionCAS string `json:"cvCas,omitempty"`
4659
ImportCAS string `json:"importCAS,omitempty"`
@@ -50,20 +63,20 @@ type PersistedHybridLogicalVector struct {
5063
PreviousVersions map[string]string `json:"pv,omitempty"`
5164
}
5265

53-
// NewHybridLogicalVector returns a HybridLogicalVector struct with maps initialised in the struct
66+
// NewHybridLogicalVector returns an initialised HybridLogicalVector.
5467
func NewHybridLogicalVector() HybridLogicalVector {
5568
return HybridLogicalVector{
5669
PreviousVersions: make(map[string]uint64),
5770
MergeVersions: make(map[string]uint64),
5871
}
5972
}
6073

61-
// GetCurrentVersion return the current version vector from the HLV in memory
74+
// GetCurrentVersion returns the current version from the HLV in memory.
6275
func (hlv *HybridLogicalVector) GetCurrentVersion() (string, uint64) {
6376
return hlv.SourceID, hlv.Version
6477
}
6578

66-
// IsInConflict tests to see if in memory HLV is conflicting with another HLV
79+
// IsInConflict tests to see if in memory HLV is conflicting with another HLV.
6780
func (hlv *HybridLogicalVector) IsInConflict(otherVector HybridLogicalVector) bool {
6881
// test if either HLV(A) or HLV(B) are dominating over each other. If so they are not in conflict
6982
if hlv.isDominating(otherVector) || otherVector.isDominating(*hlv) {
@@ -73,21 +86,20 @@ func (hlv *HybridLogicalVector) IsInConflict(otherVector HybridLogicalVector) bo
7386
return true
7487
}
7588

76-
// AddVersion adds a version vector to the in memory representation of a HLV and moves current version vector to
77-
// previous versions on the HLV if needed
78-
func (hlv *HybridLogicalVector) AddVersion(newVersion SourceAndVersion) error {
79-
if newVersion.Version < hlv.Version {
80-
return fmt.Errorf("attempting to add new version vector entry with a CAS that is less than the current version CAS value. Current cas: %d new cas %d", hlv.Version, newVersion.Version)
89+
// AddVersion adds newVersion to the in memory representation of the HLV.
90+
func (hlv *HybridLogicalVector) AddVersion(newVersion Version) error {
91+
if newVersion.Value < hlv.Version {
92+
return fmt.Errorf("attempting to add new version vector entry with a CAS that is less than the current version CAS value. Current cas: %d new cas %d", hlv.Version, newVersion.Value)
8193
}
8294
// check if this is the first time we're adding a source - version pair
8395
if hlv.SourceID == "" {
84-
hlv.Version = newVersion.Version
96+
hlv.Version = newVersion.Value
8597
hlv.SourceID = newVersion.SourceID
8698
return nil
8799
}
88100
// if new entry has the same source we simple just update the version
89101
if newVersion.SourceID == hlv.SourceID {
90-
hlv.Version = newVersion.Version
102+
hlv.Version = newVersion.Value
91103
return nil
92104
}
93105
// if we get here this is a new version from a different sourceID thus need to move current sourceID to previous versions and update current version
@@ -107,12 +119,13 @@ func (hlv *HybridLogicalVector) AddVersion(newVersion SourceAndVersion) error {
107119
// source doesn't exist in PV so add
108120
hlv.PreviousVersions[hlv.SourceID] = hlv.Version
109121
}
110-
hlv.Version = newVersion.Version
122+
hlv.Version = newVersion.Value
111123
hlv.SourceID = newVersion.SourceID
112124
return nil
113125
}
114126

115-
// Remove removes a vector from previous versions section of in memory HLV
127+
// Remove removes a source from previous versions of the HLV.
128+
// TODO: Does this need to remove source from current version as well? Merge Versions?
116129
func (hlv *HybridLogicalVector) Remove(source string) error {
117130
// if entry is not found in previous versions we return error
118131
if hlv.PreviousVersions[source] == 0 {
@@ -215,7 +228,7 @@ func (hlv *HybridLogicalVector) AddNewerVersions(otherVector HybridLogicalVector
215228

216229
// create current version for incoming vector and attempt to add it to the local HLV, AddVersion will handle if attempting to add older
217230
// version than local HLVs CV pair
218-
otherVectorCV := SourceAndVersion{SourceID: otherVector.SourceID, Version: otherVector.Version}
231+
otherVectorCV := Version{SourceID: otherVector.SourceID, Value: otherVector.Version}
219232
err := hlv.AddVersion(otherVectorCV)
220233
if err != nil {
221234
return err

db/hybrid_logical_vector_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ func TestInternalHLVFunctions(t *testing.T) {
3737
const newSource = "s_testsource"
3838

3939
// create a new version vector entry that will error method AddVersion
40-
badNewVector := SourceAndVersion{
41-
Version: 123345,
40+
badNewVector := Version{
41+
Value: 123345,
4242
SourceID: currSourceId,
4343
}
4444
// create a new version vector entry that should be added to HLV successfully
45-
newVersionVector := SourceAndVersion{
46-
Version: newCAS,
45+
newVersionVector := Version{
46+
Value: newCAS,
4747
SourceID: currSourceId,
4848
}
4949

db/revision_cache_bypass.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func (rc *BypassRevisionCache) GetWithRev(ctx context.Context, docID, revID stri
5656
}
5757

5858
// GetWithCV fetches the Current Version for the given docID and CV immediately from the bucket.
59-
func (rc *BypassRevisionCache) GetWithCV(ctx context.Context, docID string, cv *SourceAndVersion, includeBody, includeDelta bool) (docRev DocumentRevision, err error) {
59+
func (rc *BypassRevisionCache) GetWithCV(ctx context.Context, docID string, cv *Version, includeBody, includeDelta bool) (docRev DocumentRevision, err error) {
6060

6161
unmarshalLevel := DocUnmarshalSync
6262
if includeBody {
@@ -126,7 +126,7 @@ func (rc *BypassRevisionCache) RemoveWithRev(docID, revID string) {
126126
// nop
127127
}
128128

129-
func (rc *BypassRevisionCache) RemoveWithCV(docID string, cv *SourceAndVersion) {
129+
func (rc *BypassRevisionCache) RemoveWithCV(docID string, cv *Version) {
130130
// nop
131131
}
132132

db/revision_cache_interface.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ type RevisionCache interface {
3636
// GetWithCV returns the given revision by CV, and stores if not already cached.
3737
// When includeBody=true, the returned DocumentRevision will include a mutable shallow copy of the marshaled body.
3838
// When includeDelta=true, the returned DocumentRevision will include delta - requires additional locking during retrieval.
39-
GetWithCV(ctx context.Context, docID string, cv *SourceAndVersion, includeBody, includeDelta bool) (DocumentRevision, error)
39+
GetWithCV(ctx context.Context, docID string, cv *Version, includeBody, includeDelta bool) (DocumentRevision, error)
4040

4141
// GetActive returns the current revision for the given doc ID, and stores if not already cached.
4242
// When includeBody=true, the returned DocumentRevision will include a mutable shallow copy of the marshaled body.
@@ -55,7 +55,7 @@ type RevisionCache interface {
5555
RemoveWithRev(docID, revID string)
5656

5757
// RemoveWithCV evicts a revision from the cache using its current version.
58-
RemoveWithCV(docID string, cv *SourceAndVersion)
58+
RemoveWithCV(docID string, cv *Version)
5959

6060
// UpdateDelta stores the given toDelta value in the given rev if cached
6161
UpdateDelta(ctx context.Context, docID, revID string, toDelta RevisionDelta)
@@ -128,7 +128,7 @@ type DocumentRevision struct {
128128
Delta *RevisionDelta
129129
Deleted bool
130130
Removed bool // True if the revision is a removal.
131-
CV *SourceAndVersion
131+
CV *Version
132132

133133
_shallowCopyBody Body // an unmarshalled body that can produce shallow copies
134134
}
@@ -262,7 +262,7 @@ func newRevCacheDelta(deltaBytes []byte, fromRevID string, toRevision DocumentRe
262262

263263
// This is the RevisionCacheLoaderFunc callback for the context's RevisionCache.
264264
// Its job is to load a revision from the bucket when there's a cache miss.
265-
func revCacheLoader(ctx context.Context, backingStore RevisionCacheBackingStore, id IDAndRev, unmarshalBody bool) (bodyBytes []byte, body Body, history Revisions, channels base.Set, removed bool, attachments AttachmentsMeta, deleted bool, expiry *time.Time, fetchedCV *SourceAndVersion, err error) {
265+
func revCacheLoader(ctx context.Context, backingStore RevisionCacheBackingStore, id IDAndRev, unmarshalBody bool) (bodyBytes []byte, body Body, history Revisions, channels base.Set, removed bool, attachments AttachmentsMeta, deleted bool, expiry *time.Time, fetchedCV *Version, err error) {
266266
var doc *Document
267267
unmarshalLevel := DocUnmarshalSync
268268
if unmarshalBody {
@@ -278,8 +278,8 @@ func revCacheLoader(ctx context.Context, backingStore RevisionCacheBackingStore,
278278
// revCacheLoaderForCv will load a document from the bucket using the CV, comapre the fetched doc and the CV specified in the function,
279279
// and will still return revid for purpose of populating the Rev ID lookup map on the cache
280280
func revCacheLoaderForCv(ctx context.Context, backingStore RevisionCacheBackingStore, id IDandCV, unmarshalBody bool) (bodyBytes []byte, body Body, history Revisions, channels base.Set, removed bool, attachments AttachmentsMeta, deleted bool, expiry *time.Time, revid string, err error) {
281-
cv := SourceAndVersion{
282-
Version: id.Version,
281+
cv := Version{
282+
Value: id.Version,
283283
SourceID: id.Source,
284284
}
285285
var doc *Document
@@ -295,7 +295,7 @@ func revCacheLoaderForCv(ctx context.Context, backingStore RevisionCacheBackingS
295295
}
296296

297297
// Common revCacheLoader functionality used either during a cache miss (from revCacheLoader), or directly when retrieving current rev from cache
298-
func revCacheLoaderForDocument(ctx context.Context, backingStore RevisionCacheBackingStore, doc *Document, revid string) (bodyBytes []byte, body Body, history Revisions, channels base.Set, removed bool, attachments AttachmentsMeta, deleted bool, expiry *time.Time, fetchedCV *SourceAndVersion, err error) {
298+
func revCacheLoaderForDocument(ctx context.Context, backingStore RevisionCacheBackingStore, doc *Document, revid string) (bodyBytes []byte, body Body, history Revisions, channels base.Set, removed bool, attachments AttachmentsMeta, deleted bool, expiry *time.Time, fetchedCV *Version, err error) {
299299
if bodyBytes, body, attachments, err = backingStore.getRevision(ctx, doc, revid); err != nil {
300300
// If we can't find the revision (either as active or conflicted body from the document, or as old revision body backup), check whether
301301
// the revision was a channel removal. If so, we want to store as removal in the revision cache
@@ -320,15 +320,15 @@ func revCacheLoaderForDocument(ctx context.Context, backingStore RevisionCacheBa
320320
history = encodeRevisions(ctx, doc.ID, validatedHistory)
321321
channels = doc.History[revid].Channels
322322
if doc.HLV != nil {
323-
fetchedCV = &SourceAndVersion{SourceID: doc.HLV.SourceID, Version: doc.HLV.Version}
323+
fetchedCV = &Version{SourceID: doc.HLV.SourceID, Value: doc.HLV.Version}
324324
}
325325

326326
return bodyBytes, body, history, channels, removed, attachments, deleted, doc.Expiry, fetchedCV, err
327327
}
328328

329329
// revCacheLoaderForDocumentCV used either during cache miss (from revCacheLoaderForCv), or used directly when getting current active CV from cache
330330
// nolint:staticcheck
331-
func revCacheLoaderForDocumentCV(ctx context.Context, backingStore RevisionCacheBackingStore, doc *Document, cv SourceAndVersion) (bodyBytes []byte, body Body, history Revisions, channels base.Set, removed bool, attachments AttachmentsMeta, deleted bool, expiry *time.Time, revid string, err error) {
331+
func revCacheLoaderForDocumentCV(ctx context.Context, backingStore RevisionCacheBackingStore, doc *Document, cv Version) (bodyBytes []byte, body Body, history Revisions, channels base.Set, removed bool, attachments AttachmentsMeta, deleted bool, expiry *time.Time, revid string, err error) {
332332
if bodyBytes, body, attachments, err = backingStore.getCurrentVersion(ctx, doc); err != nil {
333333
// TODO: pending CBG-3213 support of channel removal for CV
334334
// we need implementation of IsChannelRemoval for CV here.

0 commit comments

Comments
 (0)