Cyrill commented on code in PR #7030:
URL: https://github.com/apache/ignite-3/pull/7030#discussion_r2566310857


##########
modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/rebalance/ZoneRebalanceRaftGroupEventsListener.java:
##########
@@ -254,32 +257,13 @@ public void onLeaderElected(
 
                             PeersAndLearners peersAndLearners = 
PeersAndLearners.fromConsistentIds(peers, learners);
 
-                            partitionMover.movePartition(peersAndLearners, 
term, entry.revision())
-                                    .whenComplete((unused, ex) -> {
-                                        // TODO 
https://issues.apache.org/jira/browse/IGNITE-23633 remove !hasCause(ex, 
TimeoutException.class)
-                                        if (ex != null && !hasCause(ex, 
NodeStoppingException.class) && !hasCause(ex,
-                                                TimeoutException.class)) {
-                                            String errorMessage = 
String.format(
-                                                    "Unable to start rebalance 
[zonePartitionId=%s, term=%s]",
-                                                    zonePartitionId,
-                                                    term
-                                            );
-                                            failureProcessor.process(new 
FailureContext(ex, errorMessage));
-                                        }
-                                    });
+                            
changePeersAndLearnersWithRetry.executeOnLeader(peersAndLearners, term, 
entry.revision())
+                                    .whenComplete((unused, ex) -> 
maybeRunFailHandler(ex, term));

Review Comment:
   there are many other places where we use whenComplete. I just wanted to be 
consistent in approaches we take.



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