ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [17/55] [abbrv] ignite git commit: Ignite-2106
Date Mon, 14 Dec 2015 14:10:32 GMT
Ignite-2106


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

Branch: refs/heads/ignite-1.5.1
Commit: 1f2af31e27c28c66b49a32090a648e3fb4c07a2d
Parents: 469bf6d
Author: Anton Vinogradov <av@apache.org>
Authored: Fri Dec 11 17:03:01 2015 +0300
Committer: Anton Vinogradov <av@apache.org>
Committed: Fri Dec 11 19:18:15 2015 +0300

----------------------------------------------------------------------
 .../distributed/near/GridNearCacheEntry.java     |  6 ++++++
 .../cache/GridCacheDeploymentSelfTest.java       | 19 ++++++++++++++-----
 2 files changed, 20 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/1f2af31e/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 6520f3d..c0a1617 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
@@ -127,6 +127,12 @@ public class GridNearCacheEntry extends GridDistributedCacheEntry {
                 }
             }
 
+            if (cctx.affinity().backup(cctx.localNode(), part, topVer)) {
+                this.topVer = -1L;
+
+                return false;
+            }
+
             this.topVer = topVer.topologyVersion();
 
             return true;

http://git-wip-us.apache.org/repos/asf/ignite/blob/1f2af31e/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentSelfTest.java
index 22e8c36..c18554e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentSelfTest.java
@@ -222,14 +222,22 @@ public class GridCacheDeploymentSelfTest extends GridCommonAbstractTest
{
     /** @throws Exception If failed. */
     @SuppressWarnings("unchecked")
     public void testDeployment4() throws Exception {
+        doDeployment4(false);
+    }
+
+    /** @throws Exception If failed. */
+    @SuppressWarnings("unchecked")
+    public void testDeployment4BackupLeavesGrid() throws Exception {
+        doDeployment4(true);
+    }
+
+    /** @throws Exception If failed. */
+    @SuppressWarnings("unchecked")
+    private void doDeployment4(boolean backupLeavesGrid) throws Exception {
         try {
             depMode = CONTINUOUS;
 
             Ignite g1 = startGrid(1);
-
-            if (g1.configuration().getMarshaller() instanceof BinaryMarshaller)
-                fail("https://issues.apache.org/jira/browse/IGNITE-2106");
-
             Ignite g2 = startGrid(2);
 
             Ignite g0 = startGrid(GRID_NAME);
@@ -248,7 +256,8 @@ public class GridCacheDeploymentSelfTest extends GridCommonAbstractTest
{
             for (int i = 0; i < 1000; i++) {
                 key = "1" + i;
 
-                if (g1.cluster().mapKeyToNode(null, key).id().equals(g2.cluster().localNode().id()))
+                if (g1.cluster().mapKeyToNode(null, key).id().equals(g2.cluster().localNode().id())
&&
+                    g1.affinity(null).isBackup((backupLeavesGrid ? g0 : g1).cluster().localNode(),
key))
                     break;
             }
 


Mime
View raw message