ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [27/50] ignite git commit: ignite-5519 : Removed failing assertion. Added assertions for safety of concurrent modifications.
Date Tue, 20 Jun 2017 06:00:29 GMT
ignite-5519 : Removed failing assertion. Added assertions for safety of concurrent modifications.


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

Branch: refs/heads/ignite-2.1.2-exchange
Commit: 6b6de99153fa08d2d3be4a720d07d5dc4fced808
Parents: df121b5
Author: Ilya Lantukh <ilantukh@gridgain.com>
Authored: Sat Jun 17 14:19:01 2017 +0300
Committer: Ilya Lantukh <ilantukh@gridgain.com>
Committed: Sat Jun 17 14:19:01 2017 +0300

----------------------------------------------------------------------
 .../cache/distributed/dht/GridDhtPartitionTopologyImpl.java | 9 ++++++++-
 .../near/GridCachePartitionedNodeRestartTest.java           | 5 -----
 2 files changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/6b6de991/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
index 53f7523..2ea5336 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
@@ -914,7 +914,11 @@ public class GridDhtPartitionTopologyImpl implements GridDhtPartitionTopology
{
                 HashSet<UUID> affIds = affAssignment.getIds(p);
 
                 for (UUID nodeId : diffIds) {
-                    assert !affIds.contains(nodeId);
+                    if (affIds.contains(nodeId)) {
+                        U.warn(log, "Node from diff " + nodeId + " is affinity node. Skipping
it.");
+
+                        continue;
+                    }
 
                     if (hasState(p, nodeId, OWNING, MOVING, RENTING)) {
                         ClusterNode n = ctx.discovery().node(nodeId);
@@ -1836,6 +1840,8 @@ public class GridDhtPartitionTopologyImpl implements GridDhtPartitionTopology
{
      */
     @SuppressWarnings({"MismatchedQueryAndUpdateOfCollection"})
     private long updateLocal(int p, GridDhtPartitionState state, long updateSeq) {
+        assert lock.isWriteLockedByCurrentThread();
+
         ClusterNode oldest = discoCache.oldestAliveServerNodeWithCache();
 
         assert oldest != null || ctx.kernalContext().clientNode();
@@ -1908,6 +1914,7 @@ public class GridDhtPartitionTopologyImpl implements GridDhtPartitionTopology
{
      */
     private void removeNode(UUID nodeId) {
         assert nodeId != null;
+        assert lock.isWriteLockedByCurrentThread();
 
         ClusterNode oldest = discoCache.oldestAliveServerNode();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/6b6de991/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedNodeRestartTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedNodeRestartTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedNodeRestartTest.java
index 4297d35..d7a0cdd 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedNodeRestartTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedNodeRestartTest.java
@@ -56,11 +56,6 @@ public class GridCachePartitionedNodeRestartTest extends GridCacheAbstractNodeRe
         return cc;
     }
 
-    @Override
-    protected void beforeTest() throws Exception {
-        fail("https://issues.apache.org/jira/browse/IGNITE-5519");
-    }
-
     /** {@inheritDoc} */
     @Override public void testRestart() throws Exception {
         super.testRestart();


Mime
View raw message