pub enum SyncPhase {
FullSyncStart,
FullSyncEnd,
SnapshotProgress,
SnapshotHandoff,
CatchUpProgress,
}Expand description
Represents different phases of the synchronization process.
Checkpoints are emitted at specific phases during sync operations to enable:
- Resumable synchronization (start from last known position)
- Incremental sync coordination (use t1/t2 checkpoints)
Variants§
FullSyncStart
Checkpoint emitted before full sync begins (t1).
This checkpoint captures the database state at the moment before data migration starts. It is used to:
- Resume incremental sync from this point
- Replay changes that occurred during full sync
FullSyncEnd
Checkpoint emitted after full sync completes (t2).
This checkpoint captures the database state at the moment after data migration completes. It marks the point where incremental sync should stop replaying and switch to live mode.
SnapshotProgress
Checkpoint emitted per chunk while a watermark snapshot is in progress.
This captures the current stream position together with per-table progress (the last primary key copied and whether the table is done), enabling a snapshot to resume mid-way after a crash without re-copying already-copied chunks.
SnapshotHandoff
Checkpoint emitted when a watermark snapshot completes.
This records the final stream position the snapshot reached. Downstream incremental/live processing continues from exactly this position.
CatchUpProgress
Catch-up progress for binlog sync: stream position plus table coverage.
Updated during incremental sync (position only) and when snapshot batches
complete (position plus covered tables). [FullSyncEnd] remains the
immutable t2 boundary written once at snapshot handoff completion.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SyncPhase
impl<'de> Deserialize<'de> for SyncPhase
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for SyncPhase
impl StructuralPartialEq for SyncPhase
Auto Trait Implementations§
impl Freeze for SyncPhase
impl RefUnwindSafe for SyncPhase
impl Send for SyncPhase
impl Sync for SyncPhase
impl Unpin for SyncPhase
impl UnsafeUnpin for SyncPhase
impl UnwindSafe for SyncPhase
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.