ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [19/25] incubator-ignite git commit: # ignite-57
Date Mon, 09 Feb 2015 20:39:36 GMT
# ignite-57


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

Branch: refs/heads/sprint-1
Commit: 6d1cf0bf388b2614ac1e7b9cd1a0db0c47129252
Parents: a43422d
Author: sboikov <semen.boikov@inria.fr>
Authored: Sun Feb 8 22:12:49 2015 +0300
Committer: sboikov <semen.boikov@inria.fr>
Committed: Sun Feb 8 22:12:49 2015 +0300

----------------------------------------------------------------------
 .../internal/processors/cache/GridCacheAdapter.java      |  2 +-
 .../cache/distributed/GridDistributedCacheAdapter.java   | 11 +++++++++++
 .../cache/GridCacheAbstractFullApiSelfTest.java          |  2 +-
 .../GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest.java |  1 +
 .../near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java  |  2 +-
 5 files changed, 15 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6d1cf0bf/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 ae0d8a9..aff6113 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
@@ -4120,7 +4120,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
     @Override public IgniteInternalFuture<Integer> sizeAsync(CachePeekMode[] peekModes)
{
         assert peekModes != null;
 
-        Collection<ClusterNode> nodes = ctx.grid().forDataNodes(name()).nodes();
+        Collection<ClusterNode> nodes = ctx.grid().forCacheNodes(name()).nodes();
 
         if (nodes.isEmpty())
             return new GridFinishedFuture<>(ctx.kernalContext(), 0);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6d1cf0bf/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 c0ec962..3f020b1 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
@@ -36,6 +36,7 @@ import org.apache.ignite.resources.*;
 import org.apache.ignite.transactions.*;
 import org.jetbrains.annotations.*;
 
+import javax.cache.*;
 import java.io.*;
 import java.util.*;
 import java.util.concurrent.*;
@@ -285,6 +286,16 @@ public abstract class GridDistributedCacheAdapter<K, V> extends
GridCacheAdapter
                             }
                         }
                     }
+
+                    Iterator<Cache.Entry<K, V>> it = dht.context().swap().offheapIterator(true,
false, topVer);
+
+                    while (it.hasNext())
+                        dataLdr.removeData(it.next().getKey());
+
+                    it = dht.context().swap().swapIterator(true, false, topVer);
+
+                    while (it.hasNext())
+                        dataLdr.removeData(it.next().getKey());
                 }
             }
             finally {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6d1cf0bf/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 1b43193..95e555f 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
@@ -2503,7 +2503,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
 
         cache.localEvict(Sets.union(ImmutableSet.of("key1", "key2"), keys));
 
-        assert cache.localSize() == 0;
+        assert cache.localSize(CachePeekMode.ONHEAP) == 0;
 
         cache.clear();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6d1cf0bf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest.java
index 528e0c8..4842287 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest.java
@@ -68,6 +68,7 @@ public class GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest extends GridCacheNe
         return PARTITIONED_ONLY;
     }
 
+    /** {@inheritDoc} */
     @Override protected void afterTest() throws Exception {
         for (int i = 0; i < gridCount(); i++)
             grid(i).cache(null).removeAll();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6d1cf0bf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java
index 9fdab54..1b9aebb 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java
@@ -266,7 +266,7 @@ public class GridCacheNearOnlyMultiNodeFullApiSelfTest extends GridCachePartitio
             jcache().clear();
 
         for (int i = 0; i < gridCount(); i++)
-            assertTrue(String.valueOf(jcache(i)), jcache(i).localSize() == 0);
+            assertEquals(ignite(i).name(), 0, jcache(i).localSize());
     }
 
     /** {@inheritDoc} */


Mime
View raw message