Repository navigation
Tolerate consensus apply timeouts in test_rejoin_cluster create loops - #8950
Merged
Merged
Conversation
The rapid drop/create loops in test_rejoin_cluster intentionally use short 3s timeouts to accumulate Raft log entries quickly. Under CI load the consensus apply for CreateCollection can exceed 3s (segment setup competes with background flushes/optimizations), and the API returns 500 even though the operation reaches consensus right after. The matching upserts already pass `fail_on_error=False`; do the same for `create_collection` to make the test resilient to that race.
timvisee
pushed a commit
that referenced
this pull request
May 8, 2026
…#8950) The rapid drop/create loops in test_rejoin_cluster intentionally use short 3s timeouts to accumulate Raft log entries quickly. Under CI load the consensus apply for CreateCollection can exceed 3s (segment setup competes with background flushes/optimizations), and the API returns 500 even though the operation reaches consensus right after. The matching upserts already pass `fail_on_error=False`; do the same for `create_collection` to make the test resilient to that race.
2 tasks
2 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
The
test_rejoin_cluster[True/False]test is flaky on CI. The rapid drop/create loops use intentionally short 3s timeouts to accumulate Raft log entries quickly, but under CI I/O load the consensus apply forCreateCollectioncan exceed 3s while segment setup competes with background flushes fromtest_collection2. The API then returns 500 even though the consensus operation commits and applies right after.Concrete trace from a recent failure: WAL append at
T+0.13s, hard-state commit atT+0.17s,Creating collectionlog atT+0.49s, segment loads finish atT+2.16s, then a ~1.85s gap with only backgroundtest_collection2flushes, then the timeout fires atT+3.97s— followed 47ms later bySuccessfully applied consensus operation entry. Index: 81. Result: true.The matching
upsert_random_pointscalls in the same loops already passfail_on_error=False. This PR threads the same flag throughcreate_collectionand uses it for the two rapid-fire loops. Final assertions (wait_for_all_replicas_active(..., "test_collection2")) still validate the rejoin behavior end-to-end.Test plan
test_rejoin_cluster[True]andtest_rejoin_cluster[False]passfail_on_errordefaulted toTrue)🤖 Generated with Claude Code