ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [2/2] ignite git commit: IGNITE-2263: GridDhtForceKeysFuture: do not use "view" anymore.
Date Sat, 02 Jan 2016 14:49:11 GMT
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 <ppozerov@list.ru>
Authored: Sat Jan 2 17:37:01 2016 +0300
Committer: thatcoach <ppozerov@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())


Mime
View raw message