Sync the audit WAL to disk (fsync).
(&self)
| 74 | |
| 75 | /// Sync the audit WAL to disk (fsync). |
| 76 | pub fn sync(&self) -> crate::Result<()> { |
| 77 | let mut wal = self.wal.lock().map_err(|_| crate::Error::Internal { |
| 78 | detail: "audit WAL lock poisoned".into(), |
| 79 | })?; |
| 80 | wal.sync().map_err(crate::Error::Wal) |
| 81 | } |
| 82 | |
| 83 | /// Append AND sync atomically. This is the primary durable write path. |
| 84 | pub fn append_durable(&self, audit_bytes: &[u8], data_lsn: u64) -> crate::Result<u64> { |