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

   ## Description
   
   This change makes removing the current ConfigNode leader resilient to 
transient Ratis leadership transfer failures.
   
   Previously, the removal pre-check selected a single running follower and 
failed immediately when `transferLeader` returned an error. A transient 
election timeout could therefore abort the removal even when another healthy 
ConfigNode was available. The code also redirected to the requested transfer 
target without verifying which ConfigNode was actually elected.
   
   This PR:
   
   - tries running ConfigNode followers in deterministic node ID order
   - retries only transient `RatisRequestFailedException` failures
   - verifies the actual ConfigNode leader after every transfer attempt
   - redirects the removal request to the actual elected leader
   - bounds additional attempts by the remaining ConfigNode RPC timeout budget
   - adds unit coverage for fallback, ambiguous transfer results, exhausted 
candidates, and non-retriable errors
   - updates the ConfigNode removal integration test to explicitly remove the 
current leader
   
   This fixes V2-1059.
   
   ## Tests
   
   - `mvn test -pl iotdb-core/confignode -Dtest=NodeManagerTest`
   - `mvn test-compile -DskipTests`
   - `mvn test-compile -DskipTests -P with-zh-locale`
   - `mvn verify -DskipUTs -Dit.test=IoTDBRemoveConfigNodeNormalIT 
-DfailIfNoTests=false -Dfailsafe.failIfNoSpecifiedTests=false -pl 
integration-test -am -PClusterIT -P with-integration-tests`


-- 
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