IGNITE-7580 Fix compatibilityMode flag consistency This closes #3466
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/8f2045e3 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/8f2045e3 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/8f2045e3 Branch: refs/heads/ignite-7485-2 Commit: 8f2045e364a4dab71cb99138d99e90b80bfc2de5 Parents: 283ab0c Author: Sergey Chugunov <sergey.chugu...@gmail.com> Authored: Fri Feb 2 11:24:29 2018 +0300 Committer: Pavel Tupitsyn <ptupit...@apache.org> Committed: Fri Feb 2 11:24:29 2018 +0300 ---------------------------------------------------------------------- .../cluster/GridClusterStateProcessor.java | 31 +------------------- 1 file changed, 1 insertion(+), 30 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/8f2045e3/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 aa23b61..eaceb69 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 @@ -65,7 +65,6 @@ import org.apache.ignite.internal.util.typedef.CI2; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.internal.CU; import org.apache.ignite.internal.util.typedef.internal.S; -import org.apache.ignite.internal.util.typedef.internal.SB; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.lang.IgniteCallable; import org.apache.ignite.lang.IgniteFuture; @@ -643,7 +642,7 @@ public class GridClusterStateProcessor extends GridProcessorAdapter implements I BaselineTopologyHistory historyToSend = null; if (joiningNodeData != null) { - if (!joiningNodeData.hasJoiningNodeData()) { + if (!joiningNodeData.hasJoiningNodeData() || compatibilityMode) { //compatibility mode: old nodes don't send any data on join, so coordinator of new version //doesn't send BaselineTopology history, only its current globalState dataBag.addGridCommonData(STATE_PROC.ordinal(), globalState); @@ -791,40 +790,12 @@ public class GridClusterStateProcessor extends GridProcessorAdapter implements I return bltNodes; } - /** - * Verifies all nodes in current cluster topology support BaselineTopology feature - * so compatibilityMode flag is enabled to reset. - * - * @param discoCache - */ - private void verifyBaselineTopologySupport(DiscoCache discoCache) { - if (discoCache.minimumServerNodeVersion().compareTo(MIN_BLT_SUPPORTING_VER) < 0) { - SB sb = new SB("Cluster contains nodes that don't support BaselineTopology: ["); - - for (ClusterNode cn : discoCache.serverNodes()) { - if (cn.version().compareTo(MIN_BLT_SUPPORTING_VER) < 0) - sb - .a("[") - .a(cn.consistentId()) - .a(":") - .a(cn.version()) - .a("], "); - } - - sb.d(sb.length() - 2, sb.length()); - - throw new IgniteException(sb.a("]").toString()); - } - } - /** */ private IgniteInternalFuture<?> changeGlobalState0(final boolean activate, BaselineTopology blt, boolean forceChangeBaselineTopology) { if (ctx.isDaemon() || ctx.clientNode()) { GridFutureAdapter<Void> fut = new GridFutureAdapter<>(); - verifyBaselineTopologySupport(ctx.discovery().discoCache()); - sendComputeChangeGlobalState(activate, blt, forceChangeBaselineTopology, fut); return fut;