MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / getSequence

Method getSequence

db/sequence_allocator.go:383–385  ·  view source on GitHub ↗

Gets the _sync:seq document value. Retry handling provided by bucket.Get.

()

Source from the content-addressed store, hash-verified

381
382// Gets the _sync:seq document value. Retry handling provided by bucket.Get.
383func (s *sequenceAllocator) getSequence() (max uint64, err error) {
384 return base.GetCounter(s.datastore, s.metaKeys.SyncSeqKey())
385}
386
387// Increments the _sync:seq document. Retry handling provided by bucket.Incr.
388// Expects sequenceAllocator.mutex to be held to ensure consistent LastSequenceReservedValue updates.

Callers 7

lastSequenceMethod · 0.95
RunMethod · 0.80

Calls 2

GetCounterFunction · 0.92
SyncSeqKeyMethod · 0.80

Tested by 3