NSAmelchev commented on a change in pull request #7714:
URL: https://github.com/apache/ignite/pull/7714#discussion_r413735126



##########
File path: 
modules/core/src/main/java/org/apache/ignite/internal/util/distributed/DistributedProcess.java
##########
@@ -257,11 +258,20 @@ private void sendSingleMessage(Process p) {
         SingleNodeMessage<R> singleMsg = new SingleNodeMessage<>(p.id, type, 
p.resFut.result(),
             (Exception)p.resFut.error());
 
-        if (F.eq(ctx.localNodeId(), p.crdId))
-            onSingleNodeMessageReceived(singleMsg, p.crdId);
+        UUID crdId = p.crdId;
+
+        if (F.eq(ctx.localNodeId(), crdId))
+            onSingleNodeMessageReceived(singleMsg, crdId);
         else {
             try {
-                ctx.io().sendToGridTopic(p.crdId, 
GridTopic.TOPIC_DISTRIBUTED_PROCESS, singleMsg, SYSTEM_POOL);
+                ctx.io().sendToGridTopic(crdId, 
GridTopic.TOPIC_DISTRIBUTED_PROCESS, singleMsg, SYSTEM_POOL);
+            }
+            catch (ClusterTopologyCheckedException e) {
+                // The coordinator was failed. The single message will be sent 
when a new coordinator initilized.
+                if (log.isDebugEnabled()) {
+                    log.debug("Failed to send a single message to coordinator: 
[crdId=" + crdId +
+                        ", processId=" + p.id +", error=" + e.getMessage() + 
']');
+                }
             }
             catch (IgniteCheckedException e) {
                 log.error("Unable to send message to coordinator.", e);

Review comment:
       This is debug logging. Also, I reuse it in the test to make sure that 
was an attempt to sent a single message. (Another way is override distributed 
process and watching for calling `sendSingleMessage` (should be not private))




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to