Caideyipi opened a new pull request, #18885:
URL: https://github.com/apache/iotdb/pull/18885

   ## Description
   
   `dev/1.3` has 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
   
   - The new `RecoverReadTest.stopWaitsForInFlightLeaderCheck` regression fails 
against the original `dev/1.3` helper and passes with this backport.
   - Windows / JDK 17 / Ratis 3.2.1: `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:
   
   - [x] been self-reviewed.
   - [x] added comments explaining the shutdown ordering.
   - [x] added a concurrency regression test.
   
   Key changed classes: `TestUtils.MiniCluster`, `RecoverReadTest`.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to