Vladsz83 commented on code in PR #11361: URL: https://github.com/apache/ignite/pull/11361#discussion_r1633356267
########## modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotManager.java: ########## @@ -3941,7 +3927,7 @@ else if (msg instanceof SnapshotFilesFailureMessage) { } /** {@inheritDoc} */ - @Override public void onException(UUID nodeId, Throwable ex) { + @Override public synchronized void onException(UUID nodeId, Throwable ex) { Review Comment: This assert looks a bit wierd. The javadoc says `nodeId Remote node id on which the error occurred.`. Actually, it might be also the local node. Why note something like ``` @Override public void onException(UUID nodeId, Throwable ex) { RemoteSnapshotFilesRecevier active = this.active; if (active != null && (active.rmtNodeId.equals(nodeId) || cctx.localNodeId().equals(nodeId))) active.acceptException(ex); } ``` or similar to `onNodeLeft(UUID nodeId)`: ``` @Override public synchronized void onException(UUID nodeId, Throwable ex) { boolean stopActive = false; if (active != null && (active.rmtNodeId.equals(nodeId) || cctx.localNodeId().equals(nodeId))) stopActive = true; if (stopActive || queue.stream().anyMatch(r -> r.rmtNodeId.equals(nodeId))) { if (stopActive) interruptActive(ex instanceof Exception ? (Exception)ex : new IgniteException(ex)); queue.forEach(t -> { if (t.rmtNodeId.equals(nodeId)) t.acceptException(ex); }); } } ``` WDYT? -- 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