ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [2/7] incubator-ignite git commit: # master Fixed recovery descriptor creation
Date Tue, 13 Jan 2015 03:58:42 GMT
# master Fixed recovery descriptor creation


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

Branch: refs/heads/ignite-32
Commit: 7f190ca9cd731f3f93c92fbbd16a4c652c7bb767
Parents: a7b426c
Author: sboikov <sboikov@gridgain.com>
Authored: Mon Jan 12 15:04:14 2015 +0400
Committer: sboikov <sboikov@gridgain.com>
Committed: Mon Jan 12 15:04:14 2015 +0400

----------------------------------------------------------------------
 .../ignite/spi/communication/tcp/TcpCommunicationSpi.java    | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7f190ca9/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
index c80617e..3736d08 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
@@ -519,7 +519,8 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
 
                     GridCommunicationClient oldClient = clients.putIfAbsent(node.id(), client);
 
-                    assert oldClient == null;
+                    assert oldClient == null : "Client already created [node=" + node + ",
client=" + client +
+                            ", oldClient=" + oldClient + ", recoveryDesc=" + recovery + ']';
                 }
 
                 return client;
@@ -1830,7 +1831,8 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
                             if (client0 != null) {
                                 GridCommunicationClient old = clients.put(nodeId, client0);
 
-                                assert old == null;
+                                assert old == null : "Client already created " +
+                                        "[node=" + node + ", client=" + client0 + ", oldClient="
+ old + ']';
                             }
                             else
                                 U.sleep(200);
@@ -2359,7 +2361,7 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
             int queueLimit = unackedMsgsBufSize != 0 ? unackedMsgsBufSize : (maxSize * 5);
 
             GridNioRecoveryDescriptor old =
-                recoveryDescs.put(id, recovery = new GridNioRecoveryDescriptor(queueLimit,
node, log));
+                recoveryDescs.putIfAbsent(id, recovery = new GridNioRecoveryDescriptor(queueLimit,
node, log));
 
             if (old != null)
                 recovery = old;


Mime
View raw message