Append a `CollectionTombstoned` record. Any subsequent replay that extracts this record will filter prior writes for `(tid, collection)` whose LSN is less than `purge_lsn`. `vshard_id` of `0` is conventional — tombstones are tenant-level metadata, not sharded user data. Replay filters on `(tenant_id, collection)` pair alone. Append a `TemporalPurge` audit record. Emitted by the Control Plane's bi
(
&self,
tid: TenantId,
engine: nodedb_wal::TemporalPurgeEngine,
collection: &str,
cutoff_system_ms: i64,
purged_count: u64,
)
| 169 | /// `vshard_id` is `0` — bitemporal audit-purge is collection-scoped |
| 170 | /// metadata, not sharded user data. |
| 171 | pub fn append_temporal_purge( |
| 172 | &self, |
| 173 | tid: TenantId, |
| 174 | engine: nodedb_wal::TemporalPurgeEngine, |
| 175 | collection: &str, |
| 176 | cutoff_system_ms: i64, |
| 177 | purged_count: u64, |
| 178 | ) -> crate::Result<Lsn> { |
| 179 | let payload = nodedb_wal::TemporalPurgePayload::new( |
| 180 | engine, |
| 181 | collection, |
| 182 | cutoff_system_ms, |
| 183 | purged_count, |
| 184 | ) |
| 185 | .to_bytes() |
| 186 | .map_err(crate::Error::Wal)?; |
| 187 | self.append_record( |
| 188 | RecordType::TemporalPurge, |
| 189 | tid, |
| 190 | VShardId::new(0), |
| 191 | DatabaseId::DEFAULT, |
| 192 | &payload, |
| 193 | ) |
| 194 | } |
| 195 | |
| 196 | /// Append a `SurrogateAlloc` high-watermark record. Emitted by |
| 197 | /// `SurrogateRegistry::flush` (every 1024 allocations or 200 ms, |
no test coverage detected