ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [28/50] [abbrv] incubator-ignite git commit: #IGNITE-53: fix for replicated cache.
Date Mon, 26 Jan 2015 05:53:56 GMT
#IGNITE-53: fix for replicated cache.


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

Branch: refs/heads/ignite-49
Commit: 78ce7af867c0cfd37e10508e571d58164689027c
Parents: e8de0fc
Author: ivasilinets <ivasilinets@gridgain.com>
Authored: Thu Jan 22 13:24:16 2015 +0300
Committer: ivasilinets <ivasilinets@gridgain.com>
Committed: Thu Jan 22 13:24:16 2015 +0300

----------------------------------------------------------------------
 .../ignite/internal/processors/cache/IgniteCacheProxy.java  | 9 +++++----
 .../GridCacheReplicatedPreloadLifecycleSelfTest.java        | 3 ++-
 2 files changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/78ce7af8/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
index fadb7be..e23beb6 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
@@ -878,12 +878,13 @@ public class IgniteCacheProxy<K, V> extends IgniteAsyncSupportAdapter
implements
         GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
 
         try {
-            GridCacheQuery<Map.Entry<K, V>> query =  delegate.queries().createScanQuery(null);
+            GridCacheQuery<Map.Entry<K, V>> qry =  delegate.queries().createScanQuery(null);
 
-            query.includeBackups(false);
-            query.keepAll(false);
+            qry.includeBackups(ctx.config().getCacheMode() == GridCacheMode.REPLICATED);
 
-            GridCacheQueryFuture<Map.Entry<K, V>> fut = query.execute();
+            qry.keepAll(false);
+
+            GridCacheQueryFuture<Map.Entry<K, V>> fut = qry.execute();
 
             return ctx.itHolder().iterator(fut, new CacheIteratorConverter<Entry<K,
V>, Map.Entry<K, V>>() {
                 @Override protected Entry<K, V> convert(Map.Entry<K, V> e) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/78ce7af8/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadLifecycleSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadLifecycleSelfTest.java
b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadLifecycleSelfTest.java
index 3e65a52..ea28da4 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadLifecycleSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadLifecycleSelfTest.java
@@ -162,7 +162,6 @@ public class GridCacheReplicatedPreloadLifecycleSelfTest extends GridCachePreloa
         }
     }
 
-
     /**
      * @param keys Keys.
      * @throws Exception If failed.
@@ -182,6 +181,8 @@ public class GridCacheReplicatedPreloadLifecycleSelfTest extends GridCachePreloa
 
                 GridCacheQuery<Map.Entry<Object, MyValue>> qry = c2.queries().createScanQuery(null);
 
+                qry.includeBackups(true);
+
                 final int i0 = j;
                 final int j0 = i;
 


Mime
View raw message