Skip to content

Commit

Permalink
MB-39662 add open OSO snap flag in TsVbuuid
Browse files Browse the repository at this point in the history
Change-Id: I0bd1c5a62e8389e7962fbf4d5fd9d7948bd68cbe
  • Loading branch information
deepkaran committed Sep 3, 2020
1 parent 0cd3152 commit 48555f0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions secondary/common/timestamp.go
Expand Up @@ -40,6 +40,7 @@ type TsVbuuid struct {
LargeSnap bool
SnapAligned bool
DisableAlign bool
OpenOSOSnap bool
}

// NewTsVbuuid returns reference to new instance of TsVbuuid.
Expand Down Expand Up @@ -98,6 +99,7 @@ func NewTsVbuuidCached(bucket string, numVbuckets int) *TsVbuuid {
ts.Bucket = bucket
ts.ScopeId = ""
ts.CollectionId = ""
ts.OpenOSOSnap = false
return ts
}

Expand Down Expand Up @@ -294,6 +296,14 @@ func (ts *TsVbuuid) SetDisableAlign(disable bool) {
ts.DisableAlign = disable
}

func (ts *TsVbuuid) HasOpenOSOSnap() bool {
return ts.OpenOSOSnap
}

func (ts *TsVbuuid) SetOpenOSOSnap(open bool) {
ts.OpenOSOSnap = open
}

func (ts *TsVbuuid) GetCrc64() uint64 {

if ts == nil {
Expand All @@ -317,6 +327,7 @@ func (ts *TsVbuuid) Copy() *TsVbuuid {

newTs.ScopeId = ts.ScopeId
newTs.CollectionId = ts.CollectionId
newTs.OpenOSOSnap = ts.OpenOSOSnap
return newTs
}

Expand All @@ -331,6 +342,7 @@ func (ts *TsVbuuid) CopyFrom(src *TsVbuuid) {
ts.Crc64 = src.Crc64
ts.ScopeId = src.ScopeId
ts.CollectionId = src.CollectionId
ts.OpenOSOSnap = src.OpenOSOSnap
}

// Equal returns whether `ts` and `other` compare equal.
Expand Down

0 comments on commit 48555f0

Please sign in to comment.