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


##########
modules/partition-replicator/src/main/java/org/apache/ignite/internal/partition/replicator/PartitionReplicaLifecycleManager.java:
##########
@@ -1410,6 +1409,38 @@ private CompletableFuture<Void> 
handleChangePendingAssignmentEvent(
                 }), ioExecutor);
     }
 
+    private CompletableFuture<Void> resetWithRetry(ZonePartitionId 
replicaGrpId, Assignments assignments) {
+        return supplyAsync(() ->
+                inBusyLock(busyLock, () -> replicaMgr.resetPeers(replicaGrpId, 
fromAssignments(assignments.nodes()))), ioExecutor)
+                .handleAsync((resetSuccessful, ex) -> {
+                    if (ex != null) {
+                        if (isRetriable(ex)) {
+                            LOG.error("Failed to reset peers. Retrying 
[groupId={}]. ", replicaGrpId, ex);
+
+                            return resetWithRetry(replicaGrpId, assignments);
+                        }
+
+                        return CompletableFuture.<Void>failedFuture(ex);
+                    }
+
+                    if (!resetSuccessful) {
+                        LOG.error("Reset peers unsuccessful. Retrying 
[groupId={}]. ", replicaGrpId);

Review Comment:
   done



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