[server] Keep async KV flushes on WAL batch boundaries - #4268
Open
platinumhamburg wants to merge 7 commits into
Open
[server] Keep async KV flushes on WAL batch boundaries#4268platinumhamburg wants to merge 7 commits into
platinumhamburg wants to merge 7 commits into
Conversation
Track pending WAL batch ends through append, recovery, flush completion and truncation. Keep each independently completed native write on whole WAL batches so storage backpressure cannot publish an interior high watermark. Cover native write rejection, retry, byte and entry budgets, duplicate and empty batches, leader HW publication, follower truncation and WAL recovery with real storage tests.
Reuse boxed batch ends and bypass segment scanning for a single WAL batch. Allocate the segment list only when splitting is required. Consolidate byte and entry budget coverage in the real Replica recovery test and retain the complete truncation and recovery scenario.
Accumulate complete WAL batches before checking the soft entry and byte budgets. Remove lookahead batch counters and keep trailing empty batches in the final segment. Verify grouped native writes, partial completion and recovery through real storage tests.
Keep real append/backpressure/retry and WAL recovery/truncation scenarios. Remove duplicate parameter combinations and buffer regressions while retaining existing grouping tests.
Replace the boxed boundary queue and flush snapshots with a flag on the final KV mutation of each confirmed WAL batch. Split directly on marked entries and retain the requested flush target for empty tails. Boundary cleanup follows the existing entry completion and truncation lifecycle.
Name the tail mutation marker explicitly for WAL batches and describe its per-batch call ordering. Name native write budgets as entry and byte targets rather than hard maxima.
Continue writing an existing key after deleting the KV directory so RocksDB surfaces the storage error even when the large WAL batch is applied in one native write. Keep the existing failover and full restored-data assertions.
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.
Track pending WAL batch ends through append, recovery, flush completion and truncation. Keep each independently completed native write on whole WAL batches so storage backpressure cannot publish an interior high watermark.
Cover native write rejection, retry, byte and entry budgets, duplicate and empty batches, leader HW publication, follower truncation and WAL recovery with real storage tests.
Purpose
Linked issue: close #4267
Brief change log
Tests
API and Format
Documentation