Repository navigation
[To dev/1.3] [Test] Fix Ratis mini-cluster shutdown race (#18879) - #18885
Merged
Merged
Conversation
(cherry picked from commit f8135bb)
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.
Description
dev/1.3has the same Ratis mini-cluster shutdown race as master: an in-flight leader check can access a log that teardown has already closed, causing an unexpected Ratis exit after the test assertions pass. The branch uses Ratis 3.2.1, and the new regression fails against its existing shutdown implementation.Backport #18879 (
f8135bb728497934771f708ce4dac21572137ae7). Pause elections on live peers and wait for leader stepdown through the leader event processor before closing servers. Preserve the unexpected-exit checks, repeated-stop handling, and cleanup of peers stopped earlier by a test. The only adaptation to the original patch is updating the Ratis version in the shutdown-order comment to 3.2.1.Validation
RecoverReadTest.stopWaitsForInFlightLeaderCheckregression fails against the originaldev/1.3helper and passes with this backport.mvn -nsu -B -ntp -Ddevelocity.off=true -pl iotdb-core/consensus clean test— 47 tests passed, 0 failures/errors/skips.mvn -nsu -B -ntp -Ddevelocity.off=true -pl iotdb-core/consensus spotless:apply; Spotless and Checkstyle checks passed during the clean test build.This PR has:
Key changed classes:
TestUtils.MiniCluster,RecoverReadTest.