ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [18/43] incubator-ignite git commit: ignite-656: added skipStore flag to appropriate places
Date Thu, 23 Apr 2015 18:13:14 GMT
ignite-656: added skipStore flag to appropriate places


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

Branch: refs/heads/ignite-sprint-4
Commit: 77359515ff5cfc6b32767368a556619bfcee97cd
Parents: 22eb695
Author: Denis Magda <dmagda@gridgain.com>
Authored: Mon Apr 20 12:47:18 2015 +0300
Committer: Denis Magda <dmagda@gridgain.com>
Committed: Mon Apr 20 12:47:18 2015 +0300

----------------------------------------------------------------------
 .../ignite/internal/processors/cache/GridCacheAdapter.java  | 6 +++---
 .../cache/distributed/dht/GridDhtCacheAdapter.java          | 4 +++-
 .../cache/distributed/dht/GridPartitionedGetFuture.java     | 3 +--
 .../cache/distributed/dht/atomic/GridDhtAtomicCache.java    | 9 ++++++---
 .../distributed/dht/colocated/GridDhtColocatedCache.java    | 2 +-
 .../cache/distributed/near/GridNearAtomicCache.java         | 3 ++-
 .../cache/distributed/near/GridNearCacheAdapter.java        | 9 ++++++---
 .../cache/distributed/near/GridNearCacheEntry.java          | 3 ++-
 .../cache/distributed/near/GridNearTransactionalCache.java  | 5 +++--
 .../processors/cache/local/atomic/GridLocalAtomicCache.java | 4 ++--
 .../processors/cache/transactions/IgniteTxLocalAdapter.java | 4 ++--
 11 files changed, 31 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/77359515/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 31cfa1e..b9c41d0 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
@@ -1315,8 +1315,8 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
     @Override public V getForcePrimary(K key) throws IgniteCheckedException {
         String taskName = ctx.kernalContext().job().currentTaskName();
 
-        return getAllAsync(F.asList(key), /*force primary*/true, /*skip tx*/false, null,
null, taskName, true, false)
-            .get().get(key);
+        return getAllAsync(F.asList(key), /*force primary*/true, /*skip tx*/false, null,
null, taskName, true,
+            false).get().get(key);
     }
 
     /** {@inheritDoc} */
@@ -1705,7 +1705,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
         subjId = ctx.subjectIdPerCall(subjId, prj);
 
         return getAllAsync(keys,
-                true,
+                prj == null || !prj.skipStore(),
                 entry,
                 !skipTx,
                 subjId,

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/77359515/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
index a875a26..da0814c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
@@ -528,8 +528,10 @@ public abstract class GridDhtCacheAdapter<K, V> extends GridDistributedCacheAdap
         boolean deserializePortable,
         boolean skipVals
     ) {
+        GridCacheProjectionImpl<K, V> prj = ctx.projectionPerCall();
+
         return getAllAsync(keys,
-            true,
+            prj == null || !prj.skipStore(),
             null,
             /*don't check local tx. */false,
             subjId,

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/77359515/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
index 45b9fd1..da2105d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
@@ -372,8 +372,7 @@ public class GridPartitionedGetFuture<K, V> extends GridCompoundIdentityFuture<M
                     subjId,
                     taskName == null ? 0 : taskName.hashCode(),
                     expiryPlc != null ? expiryPlc.forAccess() : -1L,
-                    skipVals);//,
-                   // cctx.skipStore());
+                    skipVals);
 
                 add(fut); // Append new future.
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/77359515/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
index ce372b1..1d0555c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
@@ -295,7 +295,8 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K,
V> {
                     taskName,
                     deserializePortable,
                     expiryPlc,
-                    skipVals);
+                    skipVals,
+                    prj != null && prj.skipStore());
             }
         });
     }
@@ -890,6 +891,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K,
V> {
      * @param deserializePortable Deserialize portable flag.
      * @param expiryPlc Expiry policy.
      * @param skipVals Skip values flag.
+     * @param skipStore Skip store flag.
      * @return Get future.
      */
     private IgniteInternalFuture<Map<K, V>> getAllAsync0(@Nullable Collection<KeyCacheObject>
keys,
@@ -899,7 +901,8 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K,
V> {
         String taskName,
         boolean deserializePortable,
         @Nullable ExpiryPolicy expiryPlc,
-        boolean skipVals) {
+        boolean skipVals,
+        boolean skipStore) {
         AffinityTopologyVersion topVer = ctx.affinity().affinityTopologyVersion();
 
         final IgniteCacheExpiryPolicy expiry = skipVals ? null : expiryPolicy(expiryPlc);
@@ -993,7 +996,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K,
V> {
         GridPartitionedGetFuture<K, V> fut = new GridPartitionedGetFuture<>(ctx,
             keys,
             topVer,
-            !ctx.skipStore(),
+            !skipStore,
             reload,
             forcePrimary,
             subjId,

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/77359515/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
index b246442..018c071 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtColocatedCache.java
@@ -186,7 +186,7 @@ public class GridDhtColocatedCache<K, V> extends GridDhtTransactionalCacheAdapte
 
         return loadAsync(
             ctx.cacheKeysView(keys),
-            true,
+            prj == null || !prj.skipStore(),
             false,
             forcePrimary,
             topVer,

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/77359515/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java
index 429dee3..1792d60 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java
@@ -384,7 +384,8 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K,
V> {
             taskName,
             deserializePortable,
             skipVals ? null : prj != null ? prj.expiry() : null,
-            skipVals);
+            skipVals,
+            prj != null && prj.skipStore());
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/77359515/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
index 98f9d88..e2cf83b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
@@ -197,7 +197,8 @@ public abstract class GridNearCacheAdapter<K, V> extends GridDistributedCacheAda
             taskName,
             true,
             null,
-            skipVals);
+            skipVals,
+            /*skip store*/false);
     }
 
     /** {@inheritDoc} */
@@ -226,6 +227,7 @@ public abstract class GridNearCacheAdapter<K, V> extends GridDistributedCacheAda
      * @param taskName Task name.
      * @param deserializePortable Deserialize portable flag.
      * @param expiryPlc Expiry policy.
+     * @param skipStore Skip store flag.
      * @return Loaded values.
      */
     public IgniteInternalFuture<Map<K, V>> loadAsync(@Nullable IgniteInternalTx
tx,
@@ -236,7 +238,8 @@ public abstract class GridNearCacheAdapter<K, V> extends GridDistributedCacheAda
         String taskName,
         boolean deserializePortable,
         @Nullable ExpiryPolicy expiryPlc,
-        boolean skipVal
+        boolean skipVal,
+        boolean skipStore
     ) {
         if (F.isEmpty(keys))
             return new GridFinishedFuture<>(Collections.<K, V>emptyMap());
@@ -247,7 +250,7 @@ public abstract class GridNearCacheAdapter<K, V> extends GridDistributedCacheAda
 
         GridNearGetFuture<K, V> fut = new GridNearGetFuture<>(ctx,
             keys,
-            !ctx.skipStore(),
+            !skipStore,
             reload,
             forcePrimary,
             txx,

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/77359515/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheEntry.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheEntry.java
index b22f79f..5f3072d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheEntry.java
@@ -327,7 +327,8 @@ public class GridNearCacheEntry extends GridDistributedCacheEntry {
             taskName,
             true,
             null,
-            false).get().get(keyValue(false));
+            false,
+            /*skip store*/false).get().get(keyValue(false));
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/77359515/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTransactionalCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTransactionalCache.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTransactionalCache.java
index 3cca1d5..c66c208 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTransactionalCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTransactionalCache.java
@@ -138,7 +138,8 @@ public class GridNearTransactionalCache<K, V> extends GridNearCacheAdapter<K,
V>
             taskName,
             deserializePortable,
             skipVals ? null : prj != null ? prj.expiry() : null,
-            skipVals);
+            skipVals,
+            prj != null && prj.skipStore());
     }
 
     /**
@@ -159,7 +160,7 @@ public class GridNearTransactionalCache<K, V> extends GridNearCacheAdapter<K,
V>
 
         GridNearGetFuture<K, V> fut = new GridNearGetFuture<>(ctx,
             keys,
-            readThrough && !ctx.skipStore(),
+            readThrough,
             false,
             false,
             tx,

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/77359515/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
index 1911300..b546a38 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
@@ -597,8 +597,8 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K,
V> {
         if (success || !storeEnabled)
             return vals;
 
-        return getAllAsync(keys, true, null, false, subjId, taskName, deserializePortable,
false, expiry, skipVals)
-            .get();
+        return getAllAsync(keys, prj == null || !prj.skipStore(), null, false, subjId, taskName,
deserializePortable,
+            false, expiry, skipVals).get();
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/77359515/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
index 8a1f8bb..a927926 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
@@ -1455,7 +1455,7 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
             },
             loadMissing(
                 cacheCtx,
-                true,
+                !cacheCtx.skipStore(),
                 false,
                 missedMap.keySet(),
                 deserializePortable,
@@ -2275,7 +2275,7 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
         if (missedForLoad != null) {
             IgniteInternalFuture<Boolean> fut = loadMissing(
                 cacheCtx,
-                /*read through*/cacheCtx.config().isLoadPreviousValue(),
+                /*read through*/cacheCtx.config().isLoadPreviousValue() && !cacheCtx.skipStore(),
                 /*async*/true,
                 missedForLoad,
                 deserializePortables(cacheCtx),


Mime
View raw message