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

Method append_checkpoint

nodedb/src/wal/manager/append.rs:102–115  ·  view source on GitHub ↗

Append a checkpoint marker. Serializes the LSN before writing.

(
        &self,
        tid: TenantId,
        vs: VShardId,
        db: DatabaseId,
        checkpoint_lsn: u64,
    )

Source from the content-addressed store, hash-verified

100
101 /// Append a checkpoint marker. Serializes the LSN before writing.
102 pub fn append_checkpoint(
103 &self,
104 tid: TenantId,
105 vs: VShardId,
106 db: DatabaseId,
107 checkpoint_lsn: u64,
108 ) -> crate::Result<Lsn> {
109 let payload =
110 zerompk::to_msgpack_vec(&checkpoint_lsn).map_err(|e| crate::Error::Serialization {
111 format: "msgpack".into(),
112 detail: format!("checkpoint: {e}"),
113 })?;
114 self.append_record(RecordType::Checkpoint, tid, vs, db, &payload)
115 }
116
117 pub fn append_timeseries_batch(
118 &self,

Callers 1

run_checkpoint_cycleFunction · 0.80

Calls 1

append_recordMethod · 0.80

Tested by

no test coverage detected