ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [43/50] incubator-ignite git commit: # ignite-629-1
Date Tue, 31 Mar 2015 17:23:34 GMT
# ignite-629-1


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

Branch: refs/heads/ignite-424
Commit: 79c76cd16d0a506a2775cb41f885bd3aff39f96e
Parents: 67bb43a
Author: sboikov <sboikov@gridgain.com>
Authored: Tue Mar 31 13:55:37 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Tue Mar 31 14:23:06 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCacheAdapter.java      |  6 ++++--
 .../cache/GridCacheConcurrentMap.java           | 21 ++------------------
 .../cache/GridCacheAbstractFullApiSelfTest.java |  2 +-
 3 files changed, 7 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/79c76cd1/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 8c6bfd6..02429b3 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
@@ -4091,7 +4091,9 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
      * @return Distributed ignite cache iterator.
      */
     public Iterator<Cache.Entry<K, V>> igniteIterator() {
-        if (!ctx.isSwapOrOffheapEnabled() && ctx.kernalContext().discovery().size()
== 1)
+        GridCacheContext ctx0 = ctx.isNear() ? ctx.near().dht().context() : ctx;
+
+        if (!ctx0.isSwapOrOffheapEnabled() && ctx0.kernalContext().discovery().size()
== 1)
             return localIteratorHonorExpirePolicy();
 
         final GridCacheProjectionImpl<K, V> prj = ctx.projectionPerCall();
@@ -4371,7 +4373,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
                 OPTIMISTIC,
                 READ_COMMITTED,
                 tCfg.getDefaultTxTimeout(),
-                !skipStore(),
+                !ctx.skipStore(),
                 0,
                 /** group lock keys */null,
                 /** partition lock */false

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/79c76cd1/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMap.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMap.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMap.java
index ba6a7f4..f45d00e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMap.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMap.java
@@ -1744,12 +1744,7 @@ public class GridCacheConcurrentMap {
             curVal = null;
 
             try {
-                CacheProjection prj = ctx.projectionPerCall();
-
-                if (prj != null)
-                    prj.removex(e.key());
-                else
-                    ((IgniteKernal)ctx.grid()).getCache(ctx.name()).removex(e.key());
+                ((IgniteKernal)ctx.grid()).getCache(ctx.name()).remove(e.key());
             }
             catch (IgniteCheckedException ex) {
                 throw new IgniteException(ex);
@@ -1806,9 +1801,6 @@ public class GridCacheConcurrentMap {
         /** */
         private GridCacheProjectionImpl prjPerCall;
 
-        /** */
-        private boolean clone;
-
         /**
          * Empty constructor required for {@link Externalizable}.
          */
@@ -2026,16 +2018,7 @@ public class GridCacheConcurrentMap {
 
         /** {@inheritDoc} */
         @Override public void remove() {
-            GridCacheProjectionImpl<K, V> oldPrj = ctx.projectionPerCall();
-
-            ctx.projectionPerCall(prjPerCall);
-
-            try {
-                it.remove();
-            }
-            finally {
-                ctx.projectionPerCall(oldPrj);
-            }
+            it.remove();
         }
 
         /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/79c76cd1/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
index d5c279b..1238565 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
@@ -4266,7 +4266,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
      * @throws Exception If failed.
      */
     public void testWithSkipStore() throws Exception {
-        if (gridCount() > 1)
+        if (gridCount() > 1) // TODO IGNITE-656 (test primary/backup/near keys with multiple
nodes).
             return;
 
         IgniteCache<String, Integer> cache = grid(0).cache(null);


Mime
View raw message