Repository navigation
fix: reclaim client journal rewrite bytes before fencing - #430
Merged
Merged
Conversation
45 of 52 tasks
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.
Summary
Large value replacements among many small cold keys can fill the client journal even when most retained bytes are obsolete: raft-engine's normal rewrite trigger counts stale entries rather than their bytes. Before fencing a batch for insufficient disk headroom, attempt one synchronized rewrite-queue reclamation using the existing reserve, measure the directory again, and retain the fence if space is still insufficient or maintenance fails.
The binding, file format, configured budgets and durable completion barrier stay unchanged. Add a pressure-rewrite counter and regressions for continuous mixed-size replacements, sync failure, and SIGKILL immediately before and after the rewritten-data sync. The fallback is synchronous and can add latency to the triggering batch.
Refs #378.
Testing
ci-pr-helperchecks: Rust formatting, workspace Clippy/tests, Python tests, Ruff and Pyright.