ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject ignite git commit: Perf - Fixed NPE on node stop.
Date Mon, 16 Nov 2015 14:35:58 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-perftest-merge f95450e68 -> 645ff4f06


Perf - Fixed NPE on node stop.


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

Branch: refs/heads/ignite-perftest-merge
Commit: 645ff4f0641bf31767966f3a76313670685fd5b2
Parents: f95450e
Author: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Authored: Mon Nov 16 17:35:46 2015 +0300
Committer: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Committed: Mon Nov 16 17:35:46 2015 +0300

----------------------------------------------------------------------
 .../cache/GridCachePartitionExchangeManager.java    | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/645ff4f0/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
index 4c4074e..7f0b2d9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
@@ -866,14 +866,18 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
         IgniteProductVersion minVer = cctx.localNode().version();
         IgniteProductVersion maxVer = cctx.localNode().version();
 
-        for (ClusterNode node : exchFut.discoveryEvent().topologyNodes()) {
-            IgniteProductVersion ver = node.version();
+        if (err == null) {
+            assert !F.isEmpty(exchFut.discoveryEvent().topologyNodes()) : exchFut.discoveryEvent();
+
+            for (ClusterNode node : exchFut.discoveryEvent().topologyNodes()) {
+                IgniteProductVersion ver = node.version();
 
-            if (ver.compareTo(minVer) < 0)
-                minVer = ver;
+                if (ver.compareTo(minVer) < 0)
+                    minVer = ver;
 
-            if (ver.compareTo(maxVer) > 0)
-                maxVer = ver;
+                if (ver.compareTo(maxVer) > 0)
+                    maxVer = ver;
+            }
         }
 
         nodeVers.put(topVer, new IgnitePair<>(minVer, maxVer));


Mime
View raw message