ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject ignite git commit: 5578
Date Thu, 03 Aug 2017 02:55:51 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-5578 c90b14a02 -> ed368b6c9


5578


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

Branch: refs/heads/ignite-5578
Commit: ed368b6c96a36965a2d5d035a7dde50c32dc7c8f
Parents: c90b14a
Author: sboikov <sboikov@gridgain.com>
Authored: Thu Aug 3 05:47:57 2017 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Thu Aug 3 05:51:24 2017 +0300

----------------------------------------------------------------------
 .../GridCachePartitionExchangeManager.java      |  2 +-
 .../dht/GridDhtPartitionTopologyImpl.java       |  2 +-
 .../GridDhtPartitionsExchangeFuture.java        | 20 ++++++++++++++++----
 .../cache/IgniteDynamicCacheStartSelfTest.java  |  5 ++---
 .../join/JoinInActiveNodeToActiveCluster.java   |  4 ++--
 5 files changed, 22 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/ed368b6c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
index e4508ce..9319ed9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
@@ -1880,7 +1880,7 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
             this.exchMergeTestWaitVer = null;
         }
 
-        synchronized (curFut) {
+        synchronized (curFut.mutex()) {
             int awaited = 0;
 
             for (CachePartitionExchangeWorkerTask task : exchWorker.futQ) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/ed368b6c/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 1ecd3e6..e99ad2c 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
@@ -2001,7 +2001,7 @@ public class GridDhtPartitionTopologyImpl implements GridDhtPartitionTopology
{
         assert oldest != null || ctx.kernalContext().clientNode();
 
         // If this node became the oldest node.
-        if (ctx.localNode().equals(oldest)) {
+        if (ctx.localNode().equals(oldest) && node2part != null) {
             long seq = node2part.updateSequence();
 
             if (seq != updateSeq) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/ed368b6c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
index 5191557..c0fd45f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
@@ -303,6 +303,13 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte
     }
 
     /**
+     * @return Future mutex.
+     */
+    public Object mutex() {
+        return mux;
+    }
+
+    /**
      * @return Shared cache context.
      */
     public GridCacheSharedContext sharedContext() {
@@ -1515,8 +1522,13 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte
         }
     }
 
+    /**
+     * @param node Joined node.
+     * @param msg Joined node message if already received.
+     * @return {@code True} if need wait for message from joined server node.
+     */
     private boolean addMergedJoinExchange(ClusterNode node, @Nullable GridDhtPartitionsSingleMessage
msg) {
-        assert Thread.holdsLock(this);
+        assert Thread.holdsLock(mux);
         assert node != null;
         assert state == ExchangeLocalState.CRD : state;
 
@@ -1607,10 +1619,10 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte
     }
 
     /**
-     * @param node
-     * @param msg
+     * @param node Sender node.
+     * @param msg Message.
      */
-    void processMergedMessage(final ClusterNode node, final GridDhtPartitionsSingleMessage
msg) {
+    private void processMergedMessage(final ClusterNode node, final GridDhtPartitionsSingleMessage
msg) {
         if (msg.client()) {
             waitAndReplyToClient(node.id(), msg);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/ed368b6c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java
index 4f606c9..05dbce0 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartSelfTest.java
@@ -481,13 +481,12 @@ public class IgniteDynamicCacheStartSelfTest extends GridCommonAbstractTest
{
 
             startGrid(nodeCount() + 1);
 
+            awaitPartitionMapExchange();
+
             // Check that cache is not deployed on new node after undeploy.
             for (int g = 0; g < nodeCount() + 2; g++) {
                 final IgniteKernal kernal0 = (IgniteKernal)grid(g);
 
-                for (IgniteInternalFuture f : kernal0.context().cache().context().exchange().exchangeFutures())
-                    f.get();
-
                 assertNull(kernal0.cache(DYNAMIC_CACHE_NAME));
             }
         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/ed368b6c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/JoinInActiveNodeToActiveCluster.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/JoinInActiveNodeToActiveCluster.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/JoinInActiveNodeToActiveCluster.java
index 45f8112..d9b0dd4 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/JoinInActiveNodeToActiveCluster.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/standbycluster/join/JoinInActiveNodeToActiveCluster.java
@@ -294,7 +294,7 @@ public class JoinInActiveNodeToActiveCluster extends AbstractNodeJoinTemplate
{
 
                         Map<String, DynamicCacheDescriptor> desc = cacheDescriptors(ig);
 
-                        Assert.assertEquals(4, desc.size());
+                        Assert.assertEquals(3, desc.size());
 
                         if (!ig.context().discovery().localNode().isClient()) {
                             Assert.assertNotNull(ig.context().cache().cache(cache1));
@@ -307,7 +307,7 @@ public class JoinInActiveNodeToActiveCluster extends AbstractNodeJoinTemplate
{
 
                         Map<String, GridCacheAdapter> caches = caches(ig);
 
-                        Assert.assertEquals(4, caches.size());
+                        Assert.assertEquals(3, caches.size());
                     }
                 }
             });


Mime
View raw message