ignite-gg-11650 Stabilize 8.0.2.ea1 branch after merging 
activation/deactivation fix check current state


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

Branch: refs/heads/ignite-3477
Commit: cbb9b9edbf1674f0ded47237e31dd2dfaeb281a0
Parents: 1ac93f0
Author: Dmitriy Govorukhin <[email protected]>
Authored: Tue Dec 20 16:39:28 2016 +0300
Committer: Dmitriy Govorukhin <[email protected]>
Committed: Tue Dec 20 16:39:28 2016 +0300

----------------------------------------------------------------------
 .../cache/distributed/dht/GridDhtPartitionTopologyImpl.java  | 3 ++-
 .../processors/cluster/GridClusterStateProcessor.java        | 8 ++++++++
 2 files changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/cbb9b9ed/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 e78c1c5..c93978c 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
@@ -1676,8 +1676,9 @@ import static 
org.apache.ignite.internal.processors.cache.distributed.dht.GridDh
 
         // In case if node joins, get topology at the time of joining node.
         ClusterNode oldest = CU.oldestAliveCacheServerNode(cctx.shared(), 
topVer);
+        boolean client = cctx.kernalContext().clientNode();
 
-        assert oldest != null || cctx.kernalContext().clientNode();
+        assert oldest != null || client : "oldest=" + oldest + " client=" + 
client;
 
         // If this node became the oldest node.
         if (cctx.localNode().equals(oldest)) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/cbb9b9ed/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/GridClusterStateProcessor.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/GridClusterStateProcessor.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/GridClusterStateProcessor.java
index 18e4a1c..c1ff5e4 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/GridClusterStateProcessor.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/GridClusterStateProcessor.java
@@ -315,6 +315,14 @@ public class GridClusterStateProcessor extends 
GridProcessorAdapter {
      *
      */
     public boolean active() {
+        ChangeGlobalStateContext actx = lastCgsCtx;
+
+        if (actx != null && !actx.activate && globalState == TRANSITION)
+            return true;
+
+        if (actx != null && actx.activate && globalState == TRANSITION)
+            return false;
+
         return globalState == ACTIVE;
     }
 

Reply via email to