ignite-656: fixing ctx.skipStore()

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

Branch: refs/heads/ignite-286
Commit: 97334ddbe4a3ed8bb2d257d35fceb6b51fa78d96
Parents: 00ccfc4
Author: Denis Magda <dma...@gridgain.com>
Authored: Mon Apr 20 17:53:11 2015 +0300
Committer: Denis Magda <dma...@gridgain.com>
Committed: Mon Apr 20 17:53:11 2015 +0300

----------------------------------------------------------------------
 .../cache/distributed/GridDistributedCacheAdapter.java  | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/97334ddb/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheAdapter.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheAdapter.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheAdapter.java
index 90bfa60..d4b0431 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheAdapter.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheAdapter.java
@@ -148,9 +148,13 @@ public abstract class GridDistributedCacheAdapter<K, V> 
extends GridCacheAdapter
                 // Send job to all data nodes.
                 Collection<ClusterNode> nodes = 
ctx.grid().cluster().forDataNodes(name()).nodes();
 
-                if (!nodes.isEmpty())
+                if (!nodes.isEmpty()) {
+                    CacheOperationContext opCtx = 
ctx.operationContextPerCall();
+
                     ctx.closures().callAsyncNoFailover(BROADCAST,
-                        new GlobalRemoveAllCallable<>(name(), topVer, 
ctx.skipStore()), nodes, true).get();
+                        new GlobalRemoveAllCallable<>(name(), topVer, opCtx != 
null && opCtx.skipStore()), nodes,
+                        true).get();
+                }
             }
             while (ctx.affinity().affinityTopologyVersion().compareTo(topVer) 
> 0);
         }
@@ -179,8 +183,10 @@ public abstract class GridDistributedCacheAdapter<K, V> 
extends GridCacheAdapter
         Collection<ClusterNode> nodes = 
ctx.grid().cluster().forDataNodes(name()).nodes();
 
         if (!nodes.isEmpty()) {
+            CacheOperationContext opCtx = ctx.operationContextPerCall();
+
             IgniteInternalFuture<?> rmvFut = 
ctx.closures().callAsyncNoFailover(BROADCAST,
-                    new GlobalRemoveAllCallable<>(name(), topVer, 
ctx.skipStore()), nodes, true);
+                    new GlobalRemoveAllCallable<>(name(), topVer, opCtx != 
null && opCtx.skipStore()), nodes, true);
 
             rmvFut.listen(new IgniteInClosure<IgniteInternalFuture<?>>() {
                 @Override public void apply(IgniteInternalFuture<?> fut) {

Reply via email to