resetLocalCheckpoint removes the local checkpoint to roll back the replication.
(dataStore base.DataStore, checkpointID string)
| 547 | |
| 548 | // resetLocalCheckpoint removes the local checkpoint to roll back the replication. |
| 549 | func 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. |
no test coverage detected