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

Function resetLocalCheckpoint

db/active_replicator_checkpointer.go:549–555  ·  view source on GitHub ↗

resetLocalCheckpoint removes the local checkpoint to roll back the replication.

(dataStore base.DataStore, checkpointID string)

Source from the content-addressed store, hash-verified

547
548// resetLocalCheckpoint removes the local checkpoint to roll back the replication.
549func resetLocalCheckpoint(dataStore base.DataStore, checkpointID string) error {
550 key := RealSpecialDocID(DocTypeLocal, CheckpointDocIDPrefix+checkpointID)
551 if err := dataStore.Delete(key); err != nil && !base.IsDocNotFoundError(err) {
552 return err
553 }
554 return nil
555}
556
557// getRemoteCheckpoint returns the sequence and rev for the remote checkpoint.
558// if the checkpoint does not exist, returns empty sequence and rev.

Callers 1

resetMethod · 0.85

Calls 3

IsDocNotFoundErrorFunction · 0.92
RealSpecialDocIDFunction · 0.85
DeleteMethod · 0.45

Tested by

no test coverage detected