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

Method complete_checkpoint

nodedb/src/storage/checkpoint.rs:180–184  ·  view source on GitHub ↗

Mark a checkpoint as complete at the given LSN. The WAL can be safely truncated up to this LSN after all engines have flushed their dirty pages.

(&mut self, lsn: u64)

Source from the content-addressed store, hash-verified

178 /// The WAL can be safely truncated up to this LSN after
179 /// all engines have flushed their dirty pages.
180 pub fn complete_checkpoint(&mut self, lsn: u64) {
181 self.checkpoint_lsn = lsn;
182 self.checkpoint_count += 1;
183 info!(lsn, count = self.checkpoint_count, "checkpoint completed");
184 }
185
186 /// LSN of the last completed checkpoint.
187 /// WAL entries before this LSN are safe to truncate.

Callers 3

execute_checkpointMethod · 0.80
maybe_run_maintenanceMethod · 0.80
checkpoint_lsn_trackingFunction · 0.80

Calls

no outgoing calls

Tested by 1

checkpoint_lsn_trackingFunction · 0.64