You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2016/01/02 15:49:11 UTC

[2/2] ignite git commit: IGNITE-2263: GridDhtForceKeysFuture: do not use "view" anymore.

IGNITE-2263: GridDhtForceKeysFuture: do not use "view" anymore.


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

Branch: refs/heads/ignite-2263
Commit: e6c5324110d94ac593c1e8729f90697f4f4ff5be
Parents: ecc7d4b
Author: thatcoach <pp...@list.ru>
Authored: Sat Jan 2 17:37:01 2016 +0300
Committer: thatcoach <pp...@list.ru>
Committed: Sat Jan 2 17:37:01 2016 +0300

----------------------------------------------------------------------
 .../dht/preloader/GridDhtForceKeysFuture.java       | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/e6c53241/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysFuture.java
index df0b8fc..795440c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysFuture.java
@@ -327,8 +327,20 @@ public final class GridDhtForceKeysFuture<K, V> extends GridCompoundFuture<Objec
 
         int part = cctx.affinity().partition(key);
 
-        List<ClusterNode> owners = F.isEmpty(exc) ? top.owners(part, topVer) :
-            new ArrayList<>(F.view(top.owners(part, topVer), F.notIn(exc)));
+        List<ClusterNode> owners;
+
+        if (F.isEmpty(exc))
+            owners = top.owners(part, topVer);
+        else {
+            List<ClusterNode> allOwners = top.owners(part, topVer);
+
+            owners = new ArrayList<>(allOwners.size());
+
+            for (ClusterNode node : allOwners) {
+                if (!exc.contains(node))
+                    owners.add(node);
+            }
+        }
 
         if (owners.isEmpty() || (owners.contains(loc) && cctx.rebalanceEnabled())) {
             if (log.isDebugEnabled())