ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject ignite git commit: ignite-4154
Date Tue, 01 Nov 2016 11:48:03 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-4154 8cce0a32e -> 617c178e5


ignite-4154


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/617c178e
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/617c178e
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/617c178e

Branch: refs/heads/ignite-4154
Commit: 617c178e5f9e5f2148ace5fce9be0fce5c4888f0
Parents: 8cce0a3
Author: sboikov <sboikov@gridgain.com>
Authored: Tue Nov 1 14:47:48 2016 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Tue Nov 1 14:47:48 2016 +0300

----------------------------------------------------------------------
 .../ignite/spi/discovery/tcp/ServerImpl.java    | 21 ++++++++++++++++++++
 1 file changed, 21 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/617c178e/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
index d7b4d09..632346b 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
@@ -1942,11 +1942,32 @@ class ServerImpl extends TcpDiscoveryImpl {
                     }
                 }
             }
+            else if (msg instanceof TcpDiscoveryNodeLeftMessage)
+                clearClientAddFinished(msg.creatorNodeId());
+            else if (msg instanceof TcpDiscoveryNodeFailedMessage)
+                clearClientAddFinished(((TcpDiscoveryNodeFailedMessage)msg).failedNodeId());
 
             msgs.add(msg);
         }
 
         /**
+         * @param clientId Client node ID.
+         */
+        private void clearClientAddFinished(UUID clientId) {
+            for (TcpDiscoveryAbstractMessage msg : msgs) {
+                if (msg instanceof TcpDiscoveryNodeAddFinishedMessage) {
+                    TcpDiscoveryNodeAddFinishedMessage addFinishMsg = (TcpDiscoveryNodeAddFinishedMessage)msg;
+
+                    if (addFinishMsg.clientDiscoData() != null && clientId.equals(addFinishMsg.nodeId()))
{
+                        addFinishMsg.clientDiscoData(null);
+
+                        break;
+                    }
+                }
+            }
+        }
+
+        /**
          * @param m1 Map 1.
          * @param m2 Map 2.
          * @return {@code True} if maps contain the same data.


Mime
View raw message