Repository: ignite Updated Branches: refs/heads/ignite-8783 dd76d7518 -> 9cc33c784
IGNITE-8738 Improved coordinator change information - Fixes #4198. Signed-off-by: Alexey Goncharuk <alexey.goncha...@gmail.com> Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/324e6105 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/324e6105 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/324e6105 Branch: refs/heads/ignite-8783 Commit: 324e610564637d243155368908964976a771e383 Parents: 62df2d9 Author: ezagumennov <ezagumen...@gridgain.com> Authored: Fri Jul 13 11:37:19 2018 +0300 Committer: Alexey Goncharuk <alexey.goncha...@gmail.com> Committed: Fri Jul 13 15:27:58 2018 +0300 ---------------------------------------------------------------------- .../ignite/internal/managers/discovery/DiscoCache.java | 10 ++++++++++ .../internal/managers/discovery/GridDiscoveryManager.java | 7 +++++++ 2 files changed, 17 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/324e6105/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/DiscoCache.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/DiscoCache.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/DiscoCache.java index 0bb01f3..73f6d23 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/DiscoCache.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/DiscoCache.java @@ -310,6 +310,16 @@ public class DiscoCache { } /** + * @return Oldest server node. + */ + @Nullable public ClusterNode oldestServerNode(){ + if (srvNodes.size() > 0) + return srvNodes.get(0); + + return null; + } + + /** * @param nodeId Node ID. * @return {@code True} if node is in alives list. */ http://git-wip-us.apache.org/repos/asf/ignite/blob/324e6105/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java index 4122fd6..38ce9bd 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java @@ -61,6 +61,7 @@ import org.apache.ignite.configuration.DefaultCommunicationFailureResolver; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.events.DiscoveryEvent; import org.apache.ignite.events.Event; +import org.apache.ignite.events.EventType; import org.apache.ignite.failure.FailureContext; import org.apache.ignite.failure.FailureType; import org.apache.ignite.failure.RestartProcessFailureHandler; @@ -1589,6 +1590,12 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> { clo.apply(summary); + ClusterNode currCrd = discoCache.oldestServerNode(); + + if ((evtType == EventType.EVT_NODE_FAILED || evtType == EventType.EVT_NODE_LEFT) && + currCrd != null && currCrd.order() > evtNode.order()) + clo.apply("Coordinator changed [prev=" + evtNode + ", cur=" + currCrd + "]"); + DiscoveryDataClusterState state = discoCache.state(); clo.apply(" ^-- Node [id=" + discoCache.localNode().id().toString().toUpperCase() + ", clusterState="