ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [02/18] ignite git commit: IGNITE-2263: DANGEROUS! Removed F.view() from ServerImpl.
Date Fri, 01 Jan 2016 21:07:29 GMT
IGNITE-2263: DANGEROUS! Removed F.view() from ServerImpl.


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

Branch: refs/heads/ignite-2263
Commit: a46200335acdbd600e98ad6ffb302d23b773d975
Parents: 31e2b13
Author: thatcoach <ppozerov@list.ru>
Authored: Fri Jan 1 16:07:42 2016 +0300
Committer: thatcoach <ppozerov@list.ru>
Committed: Fri Jan 1 16:07:42 2016 +0300

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


http://git-wip-us.apache.org/repos/asf/ignite/blob/a4620033/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 471c36b..c6f84c8 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
@@ -1762,13 +1762,19 @@ class ServerImpl extends TcpDiscoveryImpl {
                 }
 
                 // Addresses that were removed by mistake (e.g. on segmentation).
-                Collection<InetSocketAddress> missingAddrs = F.view(
-                    currAddrs,
-                    F.notContains(regAddrs)
-                );
+                Collection<InetSocketAddress> missingAddrs = null;
+
+                for (InetSocketAddress curAddr : currAddrs) {
+                    if (regAddrs == null || !regAddrs.contains(curAddr)) {
+                        if (missingAddrs == null)
+                            missingAddrs = new LinkedList<>();
+
+                        missingAddrs.add(curAddr);
+                    }
+                }
 
                 // Re-register missing addresses.
-                if (!missingAddrs.isEmpty()) {
+                if (missingAddrs != null) {
                     spi.ipFinder.registerAddresses(missingAddrs);
 
                     if (log.isDebugEnabled())


Mime
View raw message