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


##########
modules/partition-distribution/src/main/java/org/apache/ignite/internal/partitiondistribution/PartitionDistributionUtils.java:
##########
@@ -76,4 +79,19 @@ public static Set<Assignment> 
calculateAssignmentForPartition(
         return assignments.get(partitionId);
     }
 
+    /**
+     * Checks if an error is recoverable, so we can retry a rebalance intent.
+     *
+     * @param t The throwable.
+     * @return {@code True} if this is a recoverable exception.
+     */
+    public static boolean recoverable(Throwable t) {
+        if (hasCause(t, NodeStoppingException.class, 
ComponentStoppingException.class)) {
+            return false;
+        }
+        // As long as we don't have a general failure handler, we assume that 
all errors are recoverable.
+        String message = t.getMessage();
+        return message == null || !message.contains("ESTALE:Provided 
configuration is stale");

Review Comment:
   Created a new error class



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