MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / update_wal_catchup

Method update_wal_catchup

nodedb-cluster/src/migration.rs:133–141  ·  view source on GitHub ↗

Update WAL catch-up progress.

(&mut self, current_lsn: u64, source_lsn: u64)

Source from the content-addressed store, hash-verified

131
132 /// Update WAL catch-up progress.
133 pub fn update_wal_catchup(&mut self, current_lsn: u64, source_lsn: u64) {
134 if let MigrationPhase::WalCatchUp { start_lsn, .. } = self.phase {
135 self.phase = MigrationPhase::WalCatchUp {
136 start_lsn,
137 current_lsn,
138 source_lsn,
139 };
140 }
141 }
142
143 /// Check if WAL lag is low enough to proceed to cut-over.
144 pub fn is_catchup_ready(&self) -> bool {

Callers 5

full_lifecycleFunction · 0.80
pause_budget_exceededFunction · 0.80
catchup_thresholdFunction · 0.80
phase2_wal_catchupFunction · 0.80

Calls

no outgoing calls

Tested by 4

full_lifecycleFunction · 0.64
pause_budget_exceededFunction · 0.64
catchup_thresholdFunction · 0.64