pub async fn write_final(
conn: &Connection,
snapshots_dir: &Path,
ts: &str,
archive_path: Option<&Path>,
) -> Result<PathBuf>Expand description
Write the final snapshot on clean shutdown (§5.1.7).
Called after the Write Actor has stopped, so the state it folds is quiescent — nothing can commit between the fold and the write. Returns the snapshot’s path so a caller can log or verify it.
This was a Ok(()) stub that close() never called, which meant every
restart replayed the log from whatever snapshot happened to be lying around
rather than from the shutdown anchor.