ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [45/50] [abbrv] incubator-ignite git commit: Bug fix: discovery history saves incorrectly.
Date Fri, 13 Mar 2015 13:09:50 GMT
Bug fix: discovery history saves incorrectly.


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

Branch: refs/heads/ignite-gg-9858
Commit: f64212d02ed03c7670cc963ba4040ea348e8e011
Parents: c757c0b
Author: sevdokimov <sevdokimov@gridgain.com>
Authored: Thu Mar 12 19:48:30 2015 +0300
Committer: sevdokimov <sevdokimov@gridgain.com>
Committed: Thu Mar 12 19:49:00 2015 +0300

----------------------------------------------------------------------
 .../apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f64212d0/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
index ca34f1f..49d766f 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java
@@ -1016,18 +1016,19 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements
TcpDiscov
             DiscoverySpiListener lsnr = this.lsnr;
 
             if (lsnr != null) {
-                Collection<ClusterNode> processed = new LinkedList<>();
+                Set<ClusterNode> processed = new HashSet<>();
 
                 for (TcpDiscoveryNode n : rmts) {
                     assert n.visible();
 
                     processed.add(n);
 
-                    Collection<ClusterNode> top = F.viewReadOnly(rmts, F.<ClusterNode>identity(),
F.notIn(processed));
+                    List<ClusterNode> top = U.arrayList(rmts, F.notIn(processed));
 
                     topVer++;
 
-                    Map<Long, Collection<ClusterNode>> hist = updateTopologyHistory(topVer,
top);
+                    Map<Long, Collection<ClusterNode>> hist = updateTopologyHistory(topVer,
+                        Collections.unmodifiableList(top));
 
                     lsnr.onDiscovery(EVT_NODE_FAILED, topVer, n, top, hist, null);
                 }
@@ -1075,8 +1076,8 @@ public class TcpDiscoverySpi extends TcpDiscoverySpiAdapter implements
TcpDiscov
                     if (resolved.equals(locAddr))
                         return true;
                 }
-                catch (UnknownHostException ignored) {
-                    onException(ignored.getMessage(), ignored);
+                catch (UnknownHostException e) {
+                    onException(e.getMessage(), e);
                 }
         }
 


Mime
View raw message