crl-release-25.2: db: fix TestCompactionCorruption timeout#5817
Open
xxmplus wants to merge 2 commits intocockroachdb:crl-release-25.2from
Open
crl-release-25.2: db: fix TestCompactionCorruption timeout#5817xxmplus wants to merge 2 commits intocockroachdb:crl-release-25.2from
xxmplus wants to merge 2 commits intocockroachdb:crl-release-25.2from
Conversation
Cherry-pick of f2a76e8 from master. Simplify the test structure: - Reduce from 3 external files to 1 (only the missing one matters) - Scope the workload per-command via workload=(d,w) argument instead of global start-workload/stop-workload, allowing narrower key ranges that don't interfere with external file ranges. Informs cockroachdb#5815 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Cherry-pick of 4fa1e6a from master. The workload goroutine continuously creates L0 files without pausing. With L0CompactionThreshold=1, this triggers constant score-based L0 compactions that consume all concurrency slots. Virtual rewrite compactions (which materialize external files) are lowest priority and never get scheduled, causing wait-for-no-external-files to time out. Fix by pausing the workload when compactions are in progress, so flushes don't outpace compactions and virtual rewrite compactions get a chance to run. Also reduce value sizes since L0 compactions are triggered by file count (L0CompactionFileThreshold=5), not size. Fixes cockroachdb#5815 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Member
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.
Backports two fixes from master to resolve TestCompactionCorruption timeouts.
Two prior fixes on this branch (2278eff, fb6a541) addressed problem
span expiration by advancing fake time in the wait loops, but the test
continued to fail because the root cause is workload starvation of
virtual rewrite compactions.
The workload goroutine continuously creates L0 files without pausing.
With L0CompactionThreshold=1, this triggers constant score-based L0
compactions that consume all available concurrency slots. Virtual
rewrite compactions — which materialize external files — are the
lowest priority (picked in pickAutoNonScore) and never get scheduled.
This causes the wait-for-no-external-files step to time out.
Commit 1: simplify test structure (backport of f2a76e8)
for the test scenario).
workload=(d,w)argumentinstead of global start-workload/stop-workload, narrowing the key
range to reduce interference with external file compactions.
Commit 2: pause workload during compactions (backport of 4fa1e6a)
(
Metrics().Compact.NumInProgress > 0), so flushes don't outpacecompactions and virtual rewrite compactions get scheduled.
since L0 compactions are triggered by file count
(L0CompactionFileThreshold=5), not size.
Fixes #5815