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

Method replay_from

nodedb-wal/src/segmented.rs:216–222  ·  view source on GitHub ↗

Replay only records with LSN >= `from_lsn`. Used when recovering from a checkpoint — records before the checkpoint LSN have already been applied from the snapshot.

(&self, from_lsn: u64)

Source from the content-addressed store, hash-verified

214 /// Used when recovering from a checkpoint — records before the checkpoint
215 /// LSN have already been applied from the snapshot.
216 pub fn replay_from(&self, from_lsn: u64) -> Result<Vec<WalRecord>> {
217 let all = self.replay()?;
218 Ok(all
219 .into_iter()
220 .filter(|r| r.header.lsn >= from_lsn)
221 .collect())
222 }
223
224 /// Paginated replay (delegates to standalone `replay_from_limit_dir`).
225 pub fn replay_from_limit(

Callers 1

Calls 2

collectMethod · 0.80
replayMethod · 0.45

Tested by 1