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

Method PushSkipped

db/change_cache.go:1034–1045  ·  view source on GitHub ↗
(ctx context.Context, startSeq uint64, endSeq uint64)

Source from the content-addressed store, hash-verified

1032}
1033
1034func (c *changeCache) PushSkipped(ctx context.Context, startSeq uint64, endSeq uint64) {
1035 if startSeq > endSeq {
1036 base.InfofCtx(ctx, base.KeyCache, "cannot push negative skipped sequence range to skipped list: %d %d", startSeq, endSeq)
1037 return
1038 }
1039 err := c.skippedSeqs.PushSkippedSequenceEntry(NewSkippedSequenceRangeEntry(startSeq, endSeq))
1040 if err != nil {
1041 base.InfofCtx(ctx, base.KeyCache, "Error pushing skipped sequence range to skipped list: %v", err)
1042 return
1043 }
1044 c.db.BroadcastSlowMode.CompareAndSwap(false, true)
1045}
1046
1047// waitForSequence blocks up to maxWaitTime until the given sequence has been received.
1048func (c *changeCache) waitForSequence(ctx context.Context, sequence uint64, maxWaitTime time.Duration) error {

Callers 1

_addPendingLogsMethod · 0.95

Calls 4

InfofCtxFunction · 0.92
CompareAndSwapMethod · 0.80

Tested by

no test coverage detected