fix(partitions): sync checkpoints through original writers - #4253
Merged
Merged
Conversation
|
Thanks for the PR. It is labeled Slash commands (own line, regular comment) move it around the queue:
See CONTRIBUTING.md for details. |
Fresh descriptors sample past earlier writeback errors, so synchronizing reopened checkpoint files can reclaim WAL after materialized bytes were lost. Carry original-writer barriers into checkpoint mutations while preserving the active-index fence. Cover single and multiple writer failures, and record the related install-backup gap for follow-up.
jiengup
force-pushed
the
fix/failed-writeback
branch
from
September 21, 2026 17:16
30f4a6f to
6ba7ef8
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4253 +/- ##
=============================================
- Coverage 87.59% 69.37% -18.23%
- Complexity 1575 1576 +1
=============================================
Files 1284 1282 -2
Lines 224493 191250 -33243
Branches 187856 154614 -33242
=============================================
- Hits 196653 132676 -63977
- Misses 23127 53964 +30837
+ Partials 4713 4610 -103
🚀 New features to boost your workflow:
|
Contributor
Author
|
/request-review @numinnex |
hubcio
approved these changes
Sep 22, 2026
mmodzelewski
approved these changes
Sep 22, 2026
spetz
approved these changes
Sep 22, 2026
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.
Which issue does this PR address?
Closes #4141
Relates to #4252
Rationale
Linux reports delayed writeback errors through per-open-file error
cursors. A checkpoint that reopens a materialized path after the error
can miss it and reclaim the WAL after the original writer lost bytes.
What changed?
Checkpoint mutations now carry durability barriers tied to the original
writers. Active indexes keep their existing synchronous fence and pass
an internal already-synced barrier, while simulator barriers retain the
original
SimFileuntil the checkpoint mutation runs.Every supplied barrier completes before path and directory barriers and
before WAL checkpoint publication. The simulator now covers the original
#4141 failure and multiple writers for one file, and records the related
install-backup gap from #4252 as an ignored follow-up regression.
Local Execution
Passed:
cargo fmt --allcargo sort --no-format --workspacecargo check -p partitions --no-default-featurescargo clippy --all-features --all-targets -- -D warningscargo test -p journal --libcargo test -p partitions --libcargo test -p simulator --lib./scripts/ci/taplo.sh --checkgit diff --checkThe #4141 regression was confirmed red before the implementation and
passes after the fix:
cargo test -p simulator --lib \ given_a_failed_writeback_when_checkpointing_then_wal_history_should_not_be_reclaimedThe ignored #4252 regression was also confirmed to fail for the expected
reason:
install_backup::link_treepublishes the backup after syncing afresh hard-link handle that sampled past the original writer's error.
#4252 works as a follow-up issue which will not block this PR.
AI Usage
deterministic regression tests, and repository-wide storage-path audit.
unit suites, full workspace Clippy, formatting, Cargo sorting, and TOML
checks.