ignite-commits mailing list archives

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


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

Branch: refs/heads/ignite-2263
Commit: 22d36c407214aabbc97fb767cd4f9d03c044b96f
Parents: 2aed6ae
Author: thatcoach <ppozerov@list.ru>
Authored: Fri Jan 1 23:14:35 2016 +0300
Committer: thatcoach <ppozerov@list.ru>
Committed: Fri Jan 1 23:14:35 2016 +0300

----------------------------------------------------------------------
 .../dht/preloader/GridDhtForceKeysFuture.java   | 24 ++++++++++++--------
 1 file changed, 15 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/22d36c40/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 dcae189..df0b8fc 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
@@ -47,6 +47,7 @@ import org.jetbrains.annotations.Nullable;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
+import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -515,15 +516,20 @@ public final class GridDhtForceKeysFuture<K, V> extends GridCompoundFuture<Objec
 
             // If rebalancing is disabled, we need to check other backups.
             if (!cctx.rebalanceEnabled()) {
-                Collection<KeyCacheObject> retryKeys = F.view(
-                    keys,
-                    F.and(
-                        F.notIn(missedKeys),
-                        F.notIn(F.viewReadOnly(res.forcedInfos(), CU.<KeyCacheObject,
V>info2Key()))
-                    )
-                );
-
-                if (!retryKeys.isEmpty())
+                Collection<KeyCacheObject> forced = F.viewReadOnly(res.forcedInfos(),
CU.<KeyCacheObject, V>info2Key());
+
+                Collection<KeyCacheObject> retryKeys = null;
+
+                for (KeyCacheObject key : keys) {
+                    if (!F.contains(missedKeys, key) && !F.contains(forced, key))
{
+                        if (retryKeys == null)
+                            retryKeys = new LinkedList<>();
+
+                        retryKeys.add(key);
+                    }
+                }
+
+                if (retryKeys != null)
                     map(retryKeys, F.concat(false, node, exc));
             }
 


Mime
View raw message