(seq *SequenceID)
| 481 | } |
| 482 | |
| 483 | func (c *Checkpointer) _setCheckpoints(seq *SequenceID) (err error) { |
| 484 | seqStr := seq.String() |
| 485 | base.TracefCtx(c.ctx, base.KeyReplicate, "setCheckpoints(%v)", seqStr) |
| 486 | c.lastLocalCheckpointRevID, err = c.setLocalCheckpointWithRetry( |
| 487 | &replicationCheckpoint{ |
| 488 | LastSeq: seqStr, |
| 489 | Rev: c.lastLocalCheckpointRevID, |
| 490 | ConfigHash: c.configHash, |
| 491 | }) |
| 492 | if err != nil { |
| 493 | return err |
| 494 | } |
| 495 | |
| 496 | c.lastRemoteCheckpointRevID, err = c.setRemoteCheckpointWithRetry( |
| 497 | &replicationCheckpoint{ |
| 498 | LastSeq: seqStr, |
| 499 | Rev: c.lastRemoteCheckpointRevID, |
| 500 | ConfigHash: c.configHash, |
| 501 | }) |
| 502 | if err != nil { |
| 503 | return err |
| 504 | } |
| 505 | |
| 506 | c.lastCheckpointSeq = *seq |
| 507 | c.stats.SetCheckpointCount++ |
| 508 | |
| 509 | return nil |
| 510 | } |
| 511 | |
| 512 | // getLocalCheckpoint returns the sequence and rev for the local checkpoint. |
| 513 | // if the checkpoint does not exist, returns empty sequence and rev. |
no test coverage detected