Append a checkpoint marker. Serializes the LSN before writing.
(
&self,
tid: TenantId,
vs: VShardId,
db: DatabaseId,
checkpoint_lsn: u64,
)
| 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, |
no test coverage detected