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

Method Close

store_api.go:285–298  ·  view source on GitHub ↗

Close decreases the ref count on this store, and if the count is 0 proceeds to actually close the store.

()

Source from the content-addressed store, hash-verified

283// Close decreases the ref count on this store, and if the count is 0
284// proceeds to actually close the store.
285func (s *Store) Close() error {
286 s.m.Lock()
287 defer s.m.Unlock()
288
289 s.refs--
290 if s.refs > 0 || s.footer == nil {
291 return nil
292 }
293
294 footer := s.footer
295 s.footer = nil
296
297 return footer.Close()
298}
299
300// CloseEx provides more advanced closing options.
301func (s *Store) CloseEx(options StoreCloseExOptions) error {

Callers 4

CloseExMethod · 0.95
TestStoreCrashRecoveryFunction · 0.95
benchmarkStoreDoFunction · 0.95

Calls 1

CloseMethod · 0.65

Tested by 3

TestStoreCrashRecoveryFunction · 0.76
benchmarkStoreDoFunction · 0.76