test(vector): the #718 backlog fixture must not race the sweep that arms the stall - #727
Merged
Merged
Conversation
…rms the stall `eh718_a_compaction_backlog_does_not_refuse_its_own_remedy` failed on the Windows runner (TRY 3 FAIL, deterministic within the run) while passing on Linux and macOS, including on its own pre-merge dispatch matrix. It is a race in the fixture, not a defect in the product. The stall arms at `imm_count > --max-unflushed-immutable-segments` (`update_segment_stall`). The test pins that threshold to 1, so the stall becomes eligible as soon as round 1's `FT.COMPACT` produces the SECOND immutable segment — one full round before the fixture finished loading. The bit itself is set by the 1s MVCC sweep rather than by the write that created the segment, so round 2's 150 pipelined HSETs were racing that sweep. A fast host won and the round loaded clean; the Windows runner lost and every HSET came back `MOONERR busy: compaction backlog` — which the fixture read as drift and asserted on. Being refused there is the fixture's own goal, not its failure. The loader now waits for the sweep after each compact and stops the moment the backlog exists, and reads a mid-round refusal as that same signal. Round 0 stays strict: no immutable segment can exist yet, so a refusal there is a real defect (or some other guard firing) and still fails loudly. Reproduced deterministically on macOS by sleeping 1.5s after each compact — same line, same panic as Windows — then fixed and re-run 5/5 green. Verified non-vacuous by reverting the moon#718 exemption (`remedies_a_segment_backlog` -> false): the relaxed fixture still fails, and still on the `FT.COMPACT was refused BY the backlog` assertion. Every moon#718 assertion is untouched, including the control that fails rather than skips when the stall is never reached. Side effect: the test stops loading a round earlier, 4.2s -> 1.7s. Test-only; no product code changed. author: Tin Dang
|
ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing |
|
Warning Review limit reachedNext included review available in 14 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
What
eh718_a_compaction_backlog_does_not_refuse_its_own_remedy(landed with #722 / moon#718) failed on Check (Windows) —TRY 3 FAIL, deterministic within the run — while passing on Linux and macOS, including on its own pre-merge dispatch matrix. It is a race in the fixture, not a defect in the product, and it is currently red onmainfor every branch that dispatches the matrix.Root cause
The stall arms at
imm_count > --max-unflushed-immutable-segments(update_segment_stall,src/shard/segment_stall.rs:169). The test pins that threshold to1, so the stall becomes eligible the moment round 1'sFT.COMPACTproduces the second immutable segment — a full round before the fixture finished loading.The bit is set by the 1s MVCC sweep (
run_mvcc_sweep→update_segment_stall,src/shard/timers.rs:712), not by the write that created the segment. So round 2's 150 pipelined HSETs were racing that sweep:MOONERR busy: compaction backlog→ the fixture reads it as drift and assertsBeing refused there is the fixture's goal, not its failure.
Fix (test-only)
Verification
remedies_a_segment_backlog→false)Every moon#718 assertion is untouched, including the control that fails rather than skips when the stall is never reached. Side effect: the fixture stops a round earlier, 4.2s → 1.7s.
No product code changed — hence
skip-changelog.