sashapolo commented on code in PR #5993:
URL: https://github.com/apache/ignite-3/pull/5993#discussion_r2132055915


##########
modules/partition-replicator/src/main/java/org/apache/ignite/internal/partition/replicator/PartitionReplicaLifecycleManager.java:
##########
@@ -1425,20 +1425,14 @@ private CompletableFuture<Void> changePeersOnRebalance(
                                         "Node couldn't get the leader within 
timeout so the changing peers is skipped [grp={}].",
                                         replicaGrpId
                                 );
-
-                                return LeaderWithTerm.NO_LEADER;
                             }
                             if (hasCause(throwable, 
ComponentStoppingException.class)) {
                                 LOG.info("Replica is being stopped so the 
changing peers is skipped [grp={}].", replicaGrpId);
-
-                                return LeaderWithTerm.NO_LEADER;
                             }
 
-                            throw new IgniteInternalException(
-                                    INTERNAL_ERR,
-                                    "Failed to get a leader for the RAFT 
replication group [get=" + replicaGrpId + "].",
-                                    throwable
-                            );
+                            LOG.info("Failed to get a leader for the RAFT 
replication group [grp=" + replicaGrpId + "].", throwable);

Review Comment:
   Technically speaking, it would be more correct to write `LOG.info("Failed to 
get a leader for the RAFT replication group [grp={}].", throwable, 
replicaGrpId);`



##########
modules/partition-replicator/src/main/java/org/apache/ignite/internal/partition/replicator/PartitionReplicaLifecycleManager.java:
##########
@@ -1464,7 +1458,13 @@ private CompletableFuture<Void> changePeersOnRebalance(
                                         return 
raftClient.changePeersAndLearnersAsync(newConfiguration, leaderWithTerm.term())
                                                 .exceptionally(e -> null);
                                     });
-                        }));
+                        }))
+                .whenComplete((res, ex) -> {
+                    if (ex != null) {
+                        // TODO Retry on fail 
https://issues.apache.org/jira/browse/IGNITE-23633
+                        LOG.warn("Failed to change peers [grp=" + replicaGrpId 
+ "].", ex);

Review Comment:
   Same here



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to