Repository navigation
fix(local): sync the directories a durable write actually creates; bound the unsynced set (0.12.5) - #9
Merged
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the LocalFileSystem durability backport.
No open issues 🎉
What changed in this PR
Backports LocalFileSystem durability fixes to object_store 0.12.5, aligning directory-sync behavior with the main branch.
Changes:
- Tracks directories actually created and syncs their parent entries, including when concurrent cleanup or creation changes the directory tree.
- Avoids retaining known-missing directories in the unsynced set after failed creation.
- Adds regression tests and documents that stores with different
fsyncsettings must not share a root.
| File | Description |
|---|---|
src/local.rs |
Updates directory creation and sync tracking, adds regression tests, and clarifies fsync documentation. |
Review effort: Balanced
`create_parent_dirs` recorded the deepest existing ancestor, called `create_dir_all`, and synced from the new parent up to that ancestor. A concurrent delete with automatic cleanup can remove the ancestor in between; `create_dir_all` recreated it, and its new entry in the directory above was never synced. Create the missing components one `create_dir` at a time, registering each before creating it, and sync every directory from the deepest one created up to the one holding the highest one's entry. That also covers a directory another creation made in between, which holds an entry made here. (cherry picked from commit 4d3a27f)
…ed creation A creation that failed before creating anything (EACCES, ENOSPC) still recorded its would-be directories in the process-global unsynced set, and nothing cleared them. Record only directories that exist, or whose state cannot be determined. (cherry picked from commit 1d068f4)
(cherry picked from commit 9c71a13)
reidkaufmann
force-pushed
the
fsync-dir-sync-fixes-0125
branch
from
November 13, 2026 21:16
bef4fdf to
3b3cdb7
Compare
This was referenced Nov 13, 2026
Align LocalFileSystem directory creation and multipart cleanup with the upstream drafts (0.12.5)
#11
Closed
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.
Mirror of #5 onto
base-object-store-0125(object_store 0.12.5), so the influxdb_pro 3.12 backport of https://github.com/influxdata/influxdb_pro/pull/6818 pins the sameLocalFileSystembehaviour asmain(base-object-store-0132@41b600a).The three commits of #5 cherry-picked with
-x, no conflicts:cargo test --all-features, clippy-D warningsandcargo fmt --checkpass locally. The RAT job needs the Python fix from #8, backported to this branch separately.