docs(storage): correct sidecar WAL removal timing - #364
Open
teipsum wants to merge 1 commit into
Open
Conversation
The single-file format docs claimed the sidecar WAL directory is "removed after each checkpoint". It is not: periodic checkpoints fold in-flight mutations into the .grafeo file but retain the sidecar, and remove_sidecar_wal is invoked only on a clean close() (see the engine close path's close:before_remove_sidecar_wal crash point). Retaining the sidecar across checkpoints is what lets an unexpected restart recover in-flight mutations; only an orderly close discards it. Correct the module docs (file/mod.rs), the GrafeoFileManager lifecycle steps, and the remove_sidecar_wal docstring to match actual behaviour. Docs-only; no functional change.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The single-file storage docs claimed the sidecar WAL directory is "removed after each checkpoint". It is not: periodic checkpoints fold in-flight mutations into the
.grafeofile but retain the sidecar;remove_sidecar_walis invoked only on a cleanclose(). Retaining the sidecar across checkpoints is exactly what lets an unexpected restart recover in-flight mutations — only an orderly close discards it.Fix
Correct three docstrings to match actual behaviour: the
file/mod.rsmodule doc, theGrafeoFileManagerlifecycle steps, and theremove_sidecar_waldoc comment (all undercrates/grafeo-storage/src/file/). Docs-only; no functional change.Note:
flush.rsalready documents the periodic-checkpoint WAL correctly as "Kept" on currentmain, so it is deliberately left untouched — only the remaining stale docstrings are corrected.Tests
Single commit, based on
main@4ebae02.Summary by cubic
Fix storage docs to reflect the correct sidecar WAL lifecycle: periodic checkpoints keep the sidecar; only a clean
close()callsremove_sidecar_wal. Updates theGrafeoFileManagerlifecycle comments and the module docs incrates/grafeo-storage/src/file/; no behavior change.Written for commit 18e59df. Summary will update on new commits.