Append a `SurrogateAlloc` high-watermark record. Emitted by `SurrogateRegistry::flush` (every 1024 allocations or 200 ms, whichever first) so the global surrogate counter is crash-recoverable independent of the redb `_system.surrogate_hwm` row. `vshard_id` is `0` — the surrogate hwm is a node-global allocator counter, not sharded user data.
(&self, hi: u32)
| 200 | /// row. `vshard_id` is `0` — the surrogate hwm is a node-global |
| 201 | /// allocator counter, not sharded user data. |
| 202 | pub fn append_surrogate_alloc(&self, hi: u32) -> crate::Result<Lsn> { |
| 203 | let payload = nodedb_wal::record::SurrogateAllocPayload::new(hi).to_bytes(); |
| 204 | self.append_record( |
| 205 | RecordType::SurrogateAlloc, |
| 206 | TenantId::new(0), |
| 207 | VShardId::new(0), |
| 208 | DatabaseId::DEFAULT, |
| 209 | &payload, |
| 210 | ) |
| 211 | } |
| 212 | |
| 213 | /// Append a `SurrogateBind` record. Emitted by |
| 214 | /// `SurrogateAssigner::assign` immediately after the catalog |
no test coverage detected