ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anovi...@apache.org
Subject [52/60] [abbrv] incubator-ignite git commit: # Fixed bug in GridCacheAdapter.containsKeysAsync().
Date Thu, 05 Mar 2015 14:47:19 GMT
# Fixed bug in GridCacheAdapter.containsKeysAsync().


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

Branch: refs/heads/ignite-185
Commit: 88760b72158b08489f0a9f8e827a92d88da36d44
Parents: ae413fb
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Thu Mar 5 12:34:26 2015 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Thu Mar 5 12:34:26 2015 +0300

----------------------------------------------------------------------
 .../internal/processors/cache/GridCacheAdapter.java      | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/88760b72/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
index fe88012..b8ed1d2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
@@ -689,16 +689,20 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
     @Override public IgniteInternalFuture<Boolean> containsKeysAsync(Collection<?
extends K> keys) {
         A.notNull(keys, "keys");
 
+        final Collection<? extends K> keys0;
+
         if (ctx.portableEnabled() && !F.isEmpty(keys)) {
-            keys = F.viewReadOnly(keys, new C1<K, K>() {
+            keys0 = F.viewReadOnly(keys, new C1<K, K>() {
                 @Override public K apply(K k) {
                     return (K)ctx.marshalToPortable(k);
                 }
             });
         }
+        else
+            keys0 = keys;
 
         return getAllAsync(
-            keys,
+            keys0,
             /*force primary*/false,
             /*skip tx*/false,
             /*entry*/null,
@@ -710,6 +714,9 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
             @Override public Boolean applyx(IgniteInternalFuture<Map<K, V>> fut)
throws IgniteCheckedException {
                 Map<K, V> kvMap = fut.get();
 
+                if (keys0.size() != kvMap.size())
+                    return false;
+
                 for (Map.Entry<K, V> entry : kvMap.entrySet()) {
                     if (entry.getValue() == null)
                         return false;


Mime
View raw message