Skip to content

Commit 2ee89b9

Browse files
committed
Remove dependency/code from unmerged PR
1 parent 51961cf commit 2ee89b9

File tree

2 files changed

+10
-16
lines changed

2 files changed

+10
-16
lines changed

db/document.go

+10-14
Original file line numberDiff line numberDiff line change
@@ -100,16 +100,13 @@ type SyncData struct {
100100

101101
// determine set of current channels based on removal entries.
102102
func (sd *SyncData) getCurrentChannels() base.Set {
103-
if len(sd.Channels) > 0 {
104-
ch := base.SetOf()
105-
for channelName, channelRemoval := range sd.Channels {
106-
if channelRemoval == nil || channelRemoval.Seq == 0 {
107-
ch.Add(channelName)
108-
}
103+
ch := base.SetOf()
104+
for channelName, channelRemoval := range sd.Channels {
105+
if channelRemoval == nil || channelRemoval.Seq == 0 {
106+
ch.Add(channelName)
109107
}
110-
return ch
111108
}
112-
return nil
109+
return ch
113110
}
114111

115112
func (sd *SyncData) HashRedact(salt string) SyncData {
@@ -191,12 +188,11 @@ type Document struct {
191188
Cas uint64 // Document cas
192189
rawUserXattr []byte // Raw user xattr as retrieved from the bucket
193190

194-
Deleted bool
195-
DocExpiry uint32
196-
RevID string
197-
DocAttachments AttachmentsMeta
198-
inlineSyncData bool
199-
currentRevChannels base.Set // A base.Set of the current revision's channels (determined by SyncData.Channels at UnmarshalJSON time)
191+
Deleted bool
192+
DocExpiry uint32
193+
RevID string
194+
DocAttachments AttachmentsMeta
195+
inlineSyncData bool
200196
}
201197

202198
type historyOnlySyncData struct {

db/revision_cache_test.go

-2
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,6 @@ func (t *testBackingStore) GetDocument(ctx context.Context, docid string, unmars
5454
doc.Channels = channels.ChannelMap{
5555
"*": &channels.ChannelRemoval{RevID: doc.CurrentRev},
5656
}
57-
// currentRevChannels usually populated on JSON unmarshal
58-
doc.currentRevChannels = doc.getCurrentChannels()
5957

6058
doc.HLV = &HybridLogicalVector{
6159
SourceID: "test",

0 commit comments

Comments
 (0)