You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Use of this software is governed by the Business Source License included
4
+
// in the file licenses/BSL-Couchbase.txt. As of the Change Date specified
5
+
// in that file, in accordance with the Business Source License, use of this
6
+
// software will be governed by the Apache License, Version 2.0, included in
7
+
// the file licenses/APL2.txt.
8
+
9
+
package base
10
+
11
+
import (
12
+
"context"
13
+
"sync"
14
+
)
15
+
16
+
// VBNo represents a vBucket number
17
+
typeVBNouint16
18
+
19
+
// VBucketCAS is a map of vbucket number to a CAS value. This can not be copied, it is an atomic data structure.
20
+
typeVBucketCASstruct {
21
+
m sync.Map
22
+
}
23
+
24
+
// Load returns the CAS value for the specified vbucket. This is a thread safe accessor optimized for reads. If no CAS value is found, it asserts in debug builds and returns 0.
Copy file name to clipboardExpand all lines: db/database.go
+49-13Lines changed: 49 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -161,6 +161,9 @@ type DatabaseContext struct {
161
161
DatabaseStartupError*DatabaseError// Error that occurred during database online processes startup
162
162
CachedPurgeInterval atomic.Pointer[time.Duration] // If set, the cached value of the purge interval to avoid repeated lookups
163
163
CachedVersionPruningWindow atomic.Pointer[time.Duration] // If set, the cached value of the version pruning window to avoid repeated lookups
164
+
CachedCCVStartingCas*base.VBucketCAS// If set, the cached value of the CCV starting CAS value to avoid repeated lookups
165
+
CachedCCVEnabled atomic.Bool// If set, the cached value of the CCV Enabled flag (this is not expected to transition from true->false, but could go false->true)
166
+
numVBucketsuint16// Number of vbuckets in the bucket
Copy file name to clipboardExpand all lines: db/hybrid_logical_vector.go
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -51,6 +51,10 @@ const (
51
51
minPVEntriesRetained=3// minPVEntriesRetained defines the minimum number of PV entries that should be retained after compaction, to avoid removing all history for infrequently updated/replicated documents.
52
52
)
53
53
54
+
const (
55
+
unknownSourceID="Unknown+Source"// used if the document was written before ECCV was enabled
56
+
)
57
+
54
58
typeHLVVersionsmap[string]uint64// map of source ID to version uint64 version value
55
59
56
60
// sorted will iterate through the map returning entries in a stable sorted order. Used by testing to make it easier
0 commit comments