MCPcopy Create free account
hub / github.com/couchbase/moss / segmentStack

Struct segmentStack

segment_stack.go:20–38  ·  view source on GitHub ↗

A segmentStack is a stack of segments, where higher (later) entries in the stack have higher precedence, and should "shadow" any entries of the same key from lower in the stack. A segmentStack implements the Snapshot interface.

Source from the content-addressed store, hash-verified

18// entries of the same key from lower in the stack. A segmentStack
19// implements the Snapshot interface.
20type segmentStack struct {
21 options *CollectionOptions
22 stats *CollectionStats
23
24 a []Segment
25
26 m sync.Mutex // Protects the fields the follow.
27
28 refs int
29
30 lowerLevelSnapshot *SnapshotWrapper
31
32 // incarNum represents this segmentStack's unique incarnation number assigned
33 // when the child collection was created. 0 for top-level collection.
34 incarNum uint64
35
36 // childSegStacks recursively store child collection segmentStacks.
37 childSegStacks map[string]*segmentStack
38}
39
40func (ss *segmentStack) addRef() {
41 ss.m.Lock()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected