NSAmelchev commented on code in PR #11694:
URL: https://github.com/apache/ignite/pull/11694#discussion_r1934078266


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ExchangeFailureMessage.java:
##########
@@ -91,27 +92,42 @@ public Collection<String> cacheNames() {
         return cacheNames;
     }
 
+    /** */
+    public Map<UUID, Exception> exchangeErrors() {
+        return exchangeErrors;
+    }
+
     /**
-     * @return Cache start error.
+     * @return Cache updates to be executed on exchange.
      */
-    public IgniteCheckedException error() {
-        return cause;
+    public ExchangeActions exchangeRollbackActions() {
+        return exchangeRollbackActions;
     }
 
     /**
-     * @return Cache updates to be executed on exchange.
+     * @param exchangeRollbackActions Cache updates to be executed on exchange.
      */
-    public ExchangeActions exchangeActions() {
-        return exchangeActions;
+    public void exchangeRollbackActions(ExchangeActions 
exchangeRollbackActions) {
+        assert exchangeRollbackActions != null && 
!exchangeRollbackActions.empty() : exchangeRollbackActions;
+
+        this.exchangeRollbackActions = exchangeRollbackActions;
     }
 
     /**
-     * @param exchangeActions Cache updates to be executed on exchange.
+     * Creates an IgniteCheckedException that is used as root cause of the 
exchange initialization failure. This method
+     * aggregates all the exceptions provided from all participating nodes.
+     *
+     * @return Exception that represents a cause of the exchange 
initialization failure.
      */
-    public void exchangeActions(ExchangeActions exchangeActions) {
-        assert exchangeActions != null && !exchangeActions.empty() : 
exchangeActions;
+    public IgniteCheckedException createFailureCompoundException() {
+        IgniteCheckedException ex = new IgniteCheckedException("Failed to 
complete exchange process.");
+
+        for (Map.Entry<UUID, Exception> entry : exchangeErrors.entrySet()) {
+            if (ex != entry.getValue())
+                ex.addSuppressed(entry.getValue());

Review Comment:
   U.addSuppressed ?



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