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

Method decRef

segment_stack.go:46–59  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

44}
45
46func (ss *segmentStack) decRef() {
47 ss.m.Lock()
48 ss.refs--
49 if ss.refs <= 0 {
50 if ss.stats != nil { // Only update stats if snapshot is on collection.
51 atomic.AddUint64(&ss.stats.TotSnapshotInternalClose, 1)
52 }
53 if ss.lowerLevelSnapshot != nil {
54 ss.lowerLevelSnapshot.Close()
55 ss.lowerLevelSnapshot = nil
56 }
57 }
58 ss.m.Unlock()
59}
60
61// ------------------------------------------------------
62

Callers 1

CloseMethod · 0.95

Calls 1

CloseMethod · 0.65

Tested by

no test coverage detected