This is an automated email from the ASF dual-hosted git repository.

wernerdv pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
     new 19c424181c0 IGNITE-28793 Use MessageSerializer to transfer 
BaselineStateAndHistoryData (#13412)
19c424181c0 is described below

commit 19c424181c035869b09a21825c08e9be04493968
Author: Dmitry Werner <[email protected]>
AuthorDate: Wed Aug 5 15:07:30 2026 +0500

    IGNITE-28793 Use MessageSerializer to transfer BaselineStateAndHistoryData 
(#13412)
---
 .../ignite/internal/CoreMessagesProvider.java      |   8 +
 .../preloader/GridDhtPartitionsExchangeFuture.java |   6 -
 .../cluster/BaselineStateAndHistoryData.java       |  53 ++++++
 .../cluster/BaselineTopologyHistory.java           |  18 +--
 .../cluster/BaselineTopologyHistoryItem.java       |  41 +++--
 .../cluster/DiscoveryDataClusterState.java         | 180 +++++++--------------
 .../cluster/GridClusterStateProcessor.java         |  34 +---
 .../main/resources/META-INF/classnames.properties  |   3 -
 8 files changed, 144 insertions(+), 199 deletions(-)

diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/CoreMessagesProvider.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/CoreMessagesProvider.java
index cd03c5a2f2f..e412de189b4 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/CoreMessagesProvider.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/CoreMessagesProvider.java
@@ -189,12 +189,16 @@ import 
org.apache.ignite.internal.processors.cache.transactions.TxLocksResponse;
 import org.apache.ignite.internal.processors.cache.verify.PartitionHashRecord;
 import 
org.apache.ignite.internal.processors.cache.verify.TransactionsHashRecord;
 import 
org.apache.ignite.internal.processors.cache.version.GridCacheRawVersionedEntry;
+import 
org.apache.ignite.internal.processors.cluster.BaselineStateAndHistoryData;
+import org.apache.ignite.internal.processors.cluster.BaselineTopologyHistory;
+import 
org.apache.ignite.internal.processors.cluster.BaselineTopologyHistoryItem;
 import org.apache.ignite.internal.processors.cluster.CacheMetricsMessage;
 import 
org.apache.ignite.internal.processors.cluster.ChangeGlobalStateFinishMessage;
 import org.apache.ignite.internal.processors.cluster.ChangeGlobalStateMessage;
 import org.apache.ignite.internal.processors.cluster.ClusterIdAndTag;
 import 
org.apache.ignite.internal.processors.cluster.ClusterMetricsUpdateMessage;
 import 
org.apache.ignite.internal.processors.cluster.ClusterUpdateNotifierDataBagItem;
+import org.apache.ignite.internal.processors.cluster.DiscoveryDataClusterState;
 import org.apache.ignite.internal.processors.cluster.NodeFullMetricsMessage;
 import org.apache.ignite.internal.processors.cluster.NodeMetricsMessage;
 import 
org.apache.ignite.internal.processors.continuous.ContinuousRoutineStartResultMessage;
@@ -719,6 +723,10 @@ public class CoreMessagesProvider extends 
AbstractMarshallableMessageFactoryProv
         register(ClusterUpdateNotifierDataBagItem.class);
         register(PluginsDataBagItem.class);
         register(EventsDataBagItem.class);
+        register(BaselineStateAndHistoryData.class);
+        register(BaselineTopologyHistory.class);
+        register(BaselineTopologyHistoryItem.class);
+        register(DiscoveryDataClusterState.class);
 
         // [13400 - 13500]: Operation context messages.
         msgIdx = 13400;
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 4a75be82886..059ae004645 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
@@ -106,7 +106,6 @@ import 
org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
 import org.apache.ignite.internal.processors.cluster.BaselineTopology;
 import 
org.apache.ignite.internal.processors.cluster.ChangeGlobalStateFinishMessage;
 import org.apache.ignite.internal.processors.cluster.ChangeGlobalStateMessage;
-import org.apache.ignite.internal.processors.cluster.DiscoveryDataClusterState;
 import 
org.apache.ignite.internal.processors.cluster.IgniteChangeGlobalStateSupport;
 import org.apache.ignite.internal.processors.metric.GridMetricManager;
 import 
org.apache.ignite.internal.processors.subscription.GridInternalSubscriptionProcessor;
@@ -1275,11 +1274,6 @@ public class GridDhtPartitionsExchangeFuture extends 
GridDhtTopologyFutureAdapte
 
         GridKernalContext kctx = cctx.kernalContext();
 
-        DiscoveryDataClusterState state = kctx.state().clusterState();
-
-        if (state.transitionError() != null)
-            exchangeLocE = state.transitionError();
-
         if (req.activeChanged()) {
             if (req.state().active()) {
                 if (log.isInfoEnabled()) {
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/BaselineStateAndHistoryData.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/BaselineStateAndHistoryData.java
new file mode 100644
index 00000000000..e1dea79fa15
--- /dev/null
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/BaselineStateAndHistoryData.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cluster;
+
+import org.apache.ignite.internal.Order;
+import org.apache.ignite.plugin.extensions.communication.Message;
+import org.apache.ignite.plugin.extensions.communication.MessageFactory;
+
+/**
+ * Carries cluster state and recent baseline topology history to joining nodes.
+ *
+ * <p>Instances are sent through discovery data collection during node join.
+ * A joining node receives this message, extracts the current {@link 
DiscoveryDataClusterState},
+ * and replays the {@link BaselineTopologyHistory} items into its local 
history.</p>
+ */
+public class BaselineStateAndHistoryData implements Message {
+    /** Current cluster state (active/inactive, baseline topology, transition 
info). */
+    @Order(0)
+    DiscoveryDataClusterState globalState;
+
+    /** Recent baseline topology history items for replay on the joining node. 
*/
+    @Order(1)
+    BaselineTopologyHistory recentHistory;
+
+    /** Default constructor for {@link MessageFactory}. */
+    public BaselineStateAndHistoryData() {
+        // No-op.
+    }
+
+    /**
+     * @param globalState Current cluster state.
+     * @param recentHistory  Recent baseline topology history to transfer.
+     */
+    BaselineStateAndHistoryData(DiscoveryDataClusterState globalState, 
BaselineTopologyHistory recentHistory) {
+        this.globalState = globalState;
+        this.recentHistory = recentHistory;
+    }
+}
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/BaselineTopologyHistory.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/BaselineTopologyHistory.java
index fb9e8549cca..f1c74606217 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/BaselineTopologyHistory.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/BaselineTopologyHistory.java
@@ -16,32 +16,28 @@
  */
 package org.apache.ignite.internal.processors.cluster;
 
-import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 import java.util.Queue;
 import java.util.concurrent.ConcurrentLinkedQueue;
 import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.internal.Order;
 import 
org.apache.ignite.internal.processors.cache.persistence.metastorage.ReadOnlyMetastorage;
 import 
org.apache.ignite.internal.processors.cache.persistence.metastorage.ReadWriteMetastorage;
+import org.apache.ignite.plugin.extensions.communication.Message;
 
-/**
- *
- */
-public class BaselineTopologyHistory implements Serializable {
-    /** */
-    private static final long serialVersionUID = 0L;
-
+/** */
+public class BaselineTopologyHistory implements Message {
     /** */
     private static final String METASTORE_BLT_HIST_PREFIX = "bltHist-";
 
     /** */
-    private final Queue<BaselineTopologyHistoryItem> bufferedForStore =
-        new ConcurrentLinkedQueue<>();
+    private final Queue<BaselineTopologyHistoryItem> bufferedForStore = new 
ConcurrentLinkedQueue<>();
 
     /** */
-    private final List<BaselineTopologyHistoryItem> hist = new ArrayList<>();
+    @Order(0)
+    List<BaselineTopologyHistoryItem> hist = new ArrayList<>();
 
     /** */
     void restoreHistory(ReadOnlyMetastorage metastorage, int lastId) throws 
IgniteCheckedException {
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/BaselineTopologyHistoryItem.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/BaselineTopologyHistoryItem.java
index 4b2f0b5f2fb..76262fcf675 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/BaselineTopologyHistoryItem.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/BaselineTopologyHistoryItem.java
@@ -18,40 +18,39 @@ package org.apache.ignite.internal.processors.cluster;
 
 import java.io.Serializable;
 import java.util.ArrayList;
-import java.util.Collection;
 import java.util.List;
-import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.internal.Order;
+import org.apache.ignite.plugin.extensions.communication.Message;
+import org.apache.ignite.plugin.extensions.communication.MessageFactory;
 
-/**
- *
- */
-public class BaselineTopologyHistoryItem implements Serializable {
+/** */
+public class BaselineTopologyHistoryItem implements Serializable, Message {
     /** */
     private static final long serialVersionUID = 0L;
 
     /** */
-    private final int id;
+    @Order(0)
+    int id;
 
     /** */
-    private final Collection<Object> consIds;
+    @Order(1)
+    List<Long> branchingHistory;
 
-    /** */
-    private final List<Long> branchingHistory;
+    /** Default constructor for {@link MessageFactory}. */
+    public BaselineTopologyHistoryItem() {
+        // No-op.
+    }
 
     /**
      * @param id Id.
-     * @param consIds Consistent IDs.
      * @param branchingHistory Activation history.
      */
-    private BaselineTopologyHistoryItem(int id, Collection<Object> consIds, 
List<Long> branchingHistory) {
+    private BaselineTopologyHistoryItem(int id, List<Long> branchingHistory) {
         this.id = id;
-        this.consIds = consIds;
         this.branchingHistory = branchingHistory;
     }
 
-    /**
-     * @param blt Baseline Topology.
-     */
+    /** @param blt Baseline Topology. */
     public static BaselineTopologyHistoryItem fromBaseline(BaselineTopology 
blt) {
         if (blt == null)
             return null;
@@ -60,19 +59,15 @@ public class BaselineTopologyHistoryItem implements 
Serializable {
 
         fullActivationHistory.addAll(blt.branchingHistory());
 
-        return new BaselineTopologyHistoryItem(blt.id(), 
U.arrayList(blt.consistentIds()), fullActivationHistory);
+        return new BaselineTopologyHistoryItem(blt.id(), 
fullActivationHistory);
     }
 
-    /**
-     * @return ID.
-     */
+    /** @return ID. */
     public int id() {
         return id;
     }
 
-    /**
-     *
-     */
+    /** */
     public List<Long> branchingHistory() {
         return branchingHistory;
     }
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/DiscoveryDataClusterState.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/DiscoveryDataClusterState.java
index 8384ecbde6e..9fc933b31e2 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/DiscoveryDataClusterState.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/DiscoveryDataClusterState.java
@@ -17,16 +17,17 @@
 
 package org.apache.ignite.internal.processors.cluster;
 
-import java.io.Serializable;
 import java.util.Set;
 import java.util.UUID;
 import org.apache.ignite.cluster.ClusterState;
-import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
+import org.apache.ignite.internal.Marshalled;
+import org.apache.ignite.internal.Order;
 import org.apache.ignite.internal.util.tostring.GridToStringExclude;
-import org.apache.ignite.internal.util.tostring.GridToStringInclude;
 import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.plugin.extensions.communication.Message;
+import org.apache.ignite.plugin.extensions.communication.MessageFactory;
 import org.jetbrains.annotations.Nullable;
 
 import static org.apache.ignite.cluster.ClusterState.INACTIVE;
@@ -39,99 +40,94 @@ import static 
org.apache.ignite.cluster.ClusterState.INACTIVE;
  * a {@code transitionReqId} field is set to a non-null value and {@code 
previousBaselineTopology} captures previous cluster state.
  * A joining node catching the cluster in an intermediate state will observe 
{@code transitionReqId} field to be
  * non-null, however the {@code previousBaselineTopology} will not be sent to 
the joining node.
- *
+ * <p>
  * TODO https://issues.apache.org/jira/browse/IGNITE-7640 This class must be 
immutable, transitionRes must be set by calling finish().
  */
-public class DiscoveryDataClusterState implements Serializable {
-    /** */
-    private static final long serialVersionUID = 0L;
-
+public class DiscoveryDataClusterState implements Message {
     /** Current cluster state. */
-    private final ClusterState state;
+    @Order(0)
+    ClusterState state;
 
     /** Time of last cluster state change. */
-    private final long lastStateChangeTime;
+    @Order(1)
+    long lastStateChangeTime;
 
     /** Current cluster baseline topology. */
-    @Nullable private final BaselineTopology baselineTopology;
+    @Marshalled("baselineTopBytes")
+    @Nullable BaselineTopology baselineTop;
+
+    /** */
+    @Order(2)
+    byte[] baselineTopBytes;
 
     /**
      * Transition request ID. Set to a non-null value if the cluster is 
changing it's state.
      * The ID is assigned on the initiating node.
      */
-    private final UUID transitionReqId;
+    @Order(3)
+    UUID transitionReqId;
 
     /** Previous cluster state. May not null only if cluster in transition. */
-    private final ClusterState prevClusterState;
-
-    /**
-     * Topology version in the cluster when state change request was received 
by the coordinator.
-     * The exchange fired for the cluster state change will be on version 
{@code transitionTopVer.nextMinorVersion()}.
-     */
-    @GridToStringInclude
-    private final AffinityTopologyVersion transitionTopVer;
+    @Order(4)
+    ClusterState prevClusterState;
 
     /** Nodes participating in state change exchange. */
+    @Order(5)
     @GridToStringExclude
-    private final Set<UUID> transitionNodes;
+    Set<UUID> transitionNodes;
 
     /**
      * Local flag for state transition active state result (global state is 
updated asynchronously by custom message),
      * {@code null} means that state change is not completed yet.
      */
-    private transient volatile ClusterState transitionRes;
+    private volatile ClusterState transitionRes;
 
     /**
      * Previous cluster state if this state is a transition state and it was 
not received by a joining node.
      */
-    private transient DiscoveryDataClusterState prevState;
-
-    /** Transition result error. */
-    private transient volatile Exception transitionError;
+    private DiscoveryDataClusterState prevState;
 
     /** Local baseline autoadjustment flag. */
-    private transient volatile boolean locBaselineAutoAdjustment;
+    private volatile boolean locBaselineAutoAdjustment;
+
+    /** Default constructor for {@link MessageFactory}. */
+    public DiscoveryDataClusterState() {
+        // No-op.
+    }
 
     /**
      * @param state Current cluster state.
-     * @param baselineTopology Baseline topology associated with this state.
+     * @param baselineTop Baseline topology associated with this state.
      * @return State instance.
      */
-    static DiscoveryDataClusterState createState(
-        ClusterState state,
-        @Nullable BaselineTopology baselineTopology
-    ) {
-        return new DiscoveryDataClusterState(null, state, baselineTopology, 
null, null, null, null);
+    static DiscoveryDataClusterState createState(ClusterState state, @Nullable 
BaselineTopology baselineTop) {
+        return new DiscoveryDataClusterState(null, state, baselineTop, null, 
null, null);
     }
 
     /**
      * @param state New cluster state.
      * @param prevState Previous state.
-     * @param baselineTopology Baseline topology for new cluster state.
+     * @param baselineTop Baseline topology for new cluster state.
      * @param transitionReqId State change request ID.
-     * @param transitionTopVer State change topology version.
      * @param transitionNodes Nodes participating in state change exchange.
      * @return Discovery cluster state instance.
      */
     static DiscoveryDataClusterState createTransitionState(
         ClusterState state,
         DiscoveryDataClusterState prevState,
-        @Nullable BaselineTopology baselineTopology,
+        @Nullable BaselineTopology baselineTop,
         UUID transitionReqId,
-        AffinityTopologyVersion transitionTopVer,
         Set<UUID> transitionNodes
     ) {
         assert transitionReqId != null;
-        assert transitionTopVer != null;
         assert !F.isEmpty(transitionNodes) : transitionNodes;
         assert prevState != null;
 
         return new DiscoveryDataClusterState(
             prevState,
             state,
-            baselineTopology,
+            baselineTop,
             transitionReqId,
-            transitionTopVer,
             transitionNodes,
             prevState.state
         );
@@ -140,18 +136,16 @@ public class DiscoveryDataClusterState implements 
Serializable {
     /**
      * @param prevState Previous state. May be non-null only for transitional 
states.
      * @param state New cluster state.
-     * @param baselineTopology Baseline topology for new cluster state.
+     * @param baselineTop Baseline topology for new cluster state.
      * @param transitionReqId State change request ID.
-     * @param transitionTopVer State change topology version.
      * @param transitionNodes Nodes participating in state change exchange.
      * @param prevClusterState Nodes participating in state change exchange.
      */
     private DiscoveryDataClusterState(
         DiscoveryDataClusterState prevState,
         ClusterState state,
-        @Nullable BaselineTopology baselineTopology,
+        @Nullable BaselineTopology baselineTop,
         @Nullable UUID transitionReqId,
-        @Nullable AffinityTopologyVersion transitionTopVer,
         @Nullable Set<UUID> transitionNodes,
         @Nullable ClusterState prevClusterState
     ) {
@@ -159,10 +153,9 @@ public class DiscoveryDataClusterState implements 
Serializable {
 
         this.prevState = prevState;
         this.state = state;
-        this.lastStateChangeTime = U.currentTimeMillis();
-        this.baselineTopology = baselineTopology;
+        lastStateChangeTime = U.currentTimeMillis();
+        this.baselineTop = baselineTop;
         this.transitionReqId = transitionReqId;
-        this.transitionTopVer = transitionTopVer;
         this.transitionNodes = transitionNodes;
         this.prevClusterState = prevClusterState;
     }
@@ -181,19 +174,12 @@ public class DiscoveryDataClusterState implements 
Serializable {
             && previousBaselineTopology() == null;
     }
 
-    /**
-     * @return Cluster state before transition if cluster in transition and 
current cluster state otherwise.
-     */
+    /** @return Cluster state before transition if cluster in transition and 
current cluster state otherwise. */
     public ClusterState lastState() {
-        if (transition())
-            return prevClusterState;
-        else
-            return state;
+        return transition() ? prevClusterState : state;
     }
 
-    /**
-     * @return Local flag for state transition result (global state is updated 
asynchronously by custom message).
-     */
+    /** @return Local flag for state transition result (global state is 
updated asynchronously by custom message). */
     @Nullable public ClusterState transitionResult() {
         return transitionRes;
     }
@@ -210,23 +196,17 @@ public class DiscoveryDataClusterState implements 
Serializable {
             transitionRes = state;
     }
 
-    /**
-     * @return State change request ID.
-     */
+    /** @return State change request ID. */
     public UUID transitionRequestId() {
         return transitionReqId;
     }
 
-    /**
-     * @return {@code True} if any cluster state change is in progress (e.g. 
active state change, baseline change).
-     */
+    /** @return {@code True} if any cluster state change is in progress (e.g. 
active state change, baseline change). */
     public boolean transition() {
         return transitionReqId != null;
     }
 
-    /**
-     * @return Previous "active" flag value during transition.
-     */
+    /** @return Previous "active" flag value during transition. */
     public boolean previouslyActive() {
         if (prevState != null)
             return prevState.state != INACTIVE;
@@ -234,13 +214,6 @@ public class DiscoveryDataClusterState implements 
Serializable {
         return state == INACTIVE;
     }
 
-    /**
-     * @return State change exchange version.
-     */
-    public AffinityTopologyVersion transitionTopologyVersion() {
-        return transitionTopVer;
-    }
-
     /**
      * @return Current cluster state (or new state in case when transition is 
in progress).
      * @deprecated Use {@link #state()} instead.
@@ -250,79 +223,36 @@ public class DiscoveryDataClusterState implements 
Serializable {
         return state.active();
     }
 
-    /**
-     * @return Current cluster state (or new state in case when transition is 
in progress).
-     */
+    /** @return Current cluster state (or new state in case when transition is 
in progress). */
     public ClusterState state() {
         return state;
     }
 
-    /**
-     * @return Time of last cluster state change.
-     */
+    /** @return Time of last cluster state change. */
     public long lastStateChangeTime() {
         return lastStateChangeTime;
     }
 
-    /**
-     * @return Baseline topology.
-     */
+    /** @return Baseline topology. */
     @Nullable public BaselineTopology baselineTopology() {
-        return baselineTopology;
+        return baselineTop;
     }
 
-    /**
-     * @return Previous Baseline topology.
-     */
+    /** @return Previous Baseline topology. */
     @Nullable public BaselineTopology previousBaselineTopology() {
         return prevState != null ? prevState.baselineTopology() : null;
     }
 
-    /**
-     *
-     * @return {@code True} If baseLine changed, {@code False} if not.
-     */
-    public boolean baselineChanged() {
-        BaselineTopology prevBLT = previousBaselineTopology();
-        BaselineTopology curBLT = baselineTopology();
-
-        if (prevBLT == null && curBLT != null)
-            return true;
-
-        if (prevBLT != null && curBLT != null)
-            return !prevBLT.equals(curBLT);
-
-        return false;
-    }
-
-    /**
-     * @return {@code True} if baseline topology is set in the cluster. {@code 
False} otherwise.
-     */
+    /** @return {@code True} if baseline topology is set in the cluster. 
{@code False} otherwise. */
     public boolean hasBaselineTopology() {
-        return baselineTopology != null;
+        return baselineTop != null;
     }
 
-    /**
-     * @return Nodes participating in state change exchange.
-     */
+    /** @return Nodes participating in state change exchange. */
     public Set<UUID> transitionNodes() {
         return transitionNodes;
     }
 
-    /**
-     * @return Transition error.
-     */
-    @Nullable public Exception transitionError() {
-        return transitionError;
-    }
-
-    /**
-     * @param ex Exception
-     */
-    public void transitionError(Exception ex) {
-        transitionError = ex;
-    }
-
     /**
      * @return {@code true} if current state was created as a result of local 
baseline autoadjustment with zero timeout
      *      on in-memory cluster.
@@ -350,7 +280,7 @@ public class DiscoveryDataClusterState implements 
Serializable {
      */
     public DiscoveryDataClusterState finish(boolean success) {
         if (success)
-            return createState(state, baselineTopology);
+            return createState(state, baselineTop);
         else
             return prevState != null ? prevState : createState(INACTIVE, null);
     }
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 3d9d20faf53..f1f15bc8277 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
@@ -17,7 +17,6 @@
 
 package org.apache.ignite.internal.processors.cluster;
 
-import java.io.Serializable;
 import java.lang.reflect.Field;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -95,7 +94,7 @@ import org.apache.ignite.lang.IgniteBiPredicate;
 import org.apache.ignite.lang.IgniteFuture;
 import org.apache.ignite.lang.IgniteInClosure;
 import org.apache.ignite.lang.IgniteUuid;
-import org.apache.ignite.marshaller.jdk.JdkMarshaller;
+import org.apache.ignite.plugin.extensions.communication.Message;
 import org.apache.ignite.plugin.security.SecurityPermission;
 import org.apache.ignite.spi.IgniteNodeValidationResult;
 import org.apache.ignite.spi.discovery.DiscoveryDataBag;
@@ -183,9 +182,6 @@ public class GridClusterStateProcessor extends 
GridProcessorAdapter implements I
     @GridToStringExclude
     private ReadWriteMetastorage metastorage;
 
-    /** */
-    private final JdkMarshaller marsh;
-
     /** Updater of baseline topology. */
     private BaselineTopologyUpdater baselineTopologyUpdater;
 
@@ -221,8 +217,6 @@ public class GridClusterStateProcessor extends 
GridProcessorAdapter implements I
 
         ctx.internalSubscriptionProcessor().registerMetastorageListener(this);
 
-        marsh = ctx.marshallerContext().jdkMarshaller();
-
         distributedBaselineConfiguration = new 
DistributedBaselineConfiguration(
             ctx.internalSubscriptionProcessor(),
             ctx,
@@ -766,7 +760,6 @@ public class GridClusterStateProcessor extends 
GridProcessorAdapter implements I
                     ? msg.baselineTopology()
                     : state.baselineTopology(),
                 msg.requestId(),
-                topVer,
                 nodeIds
             );
 
@@ -957,7 +950,7 @@ public class GridClusterStateProcessor extends 
GridProcessorAdapter implements I
                 historyToSend = bltHist.tailFrom(lastId);
             }
             else
-                historyToSend = bltHist;
+                historyToSend = bltHist.tailFrom(0);
         }
 
         dataBag.addGridCommonData(STATE_PROC.ordinal(), new 
BaselineStateAndHistoryData(globalState, historyToSend));
@@ -965,7 +958,7 @@ public class GridClusterStateProcessor extends 
GridProcessorAdapter implements I
 
     /** {@inheritDoc} */
     @Override public void 
onGridDataReceived(DiscoveryDataBag.GridDiscoveryData data) {
-        Serializable commonData = data.commonData();
+        Message commonData = data.commonData();
 
         if (commonData instanceof DiscoveryDataClusterState) {
             if (globalState != null && globalState.baselineTopology() != null)
@@ -2194,9 +2187,6 @@ public class GridClusterStateProcessor extends 
GridProcessorAdapter implements I
      *
      */
     class TransitionOnJoinWaitFuture extends GridFutureAdapter<Boolean> {
-        /** */
-        private DiscoveryDataClusterState transitionState;
-
         /** */
         private final Set<UUID> transitionNodes;
 
@@ -2226,22 +2216,4 @@ public class GridClusterStateProcessor extends 
GridProcessorAdapter implements I
             return false;
         }
     }
-
-    /** */
-    private static class BaselineStateAndHistoryData implements Serializable {
-        /** */
-        private static final long serialVersionUID = 0L;
-
-        /** */
-        private final DiscoveryDataClusterState globalState;
-
-        /** */
-        private final BaselineTopologyHistory recentHistory;
-
-        /** */
-        BaselineStateAndHistoryData(DiscoveryDataClusterState globalState, 
BaselineTopologyHistory recentHistory) {
-            this.globalState = globalState;
-            this.recentHistory = recentHistory;
-        }
-    }
 }
diff --git a/modules/core/src/main/resources/META-INF/classnames.properties 
b/modules/core/src/main/resources/META-INF/classnames.properties
index 987db34c4e8..c49e06ca2f7 100644
--- a/modules/core/src/main/resources/META-INF/classnames.properties
+++ b/modules/core/src/main/resources/META-INF/classnames.properties
@@ -1470,7 +1470,6 @@ 
org.apache.ignite.internal.processors.closure.GridClosureProcessor$TaskNoReduceA
 org.apache.ignite.internal.processors.closure.GridPeerDeployAwareTaskAdapter
 org.apache.ignite.internal.processors.cluster.BaselineAdjustForbiddenException
 org.apache.ignite.internal.processors.cluster.BaselineTopology
-org.apache.ignite.internal.processors.cluster.BaselineTopologyHistory
 org.apache.ignite.internal.processors.cluster.BaselineTopologyHistoryItem
 org.apache.ignite.internal.processors.cluster.BranchingPointType
 org.apache.ignite.internal.processors.cluster.ChangeGlobalStateFinishMessage
@@ -1482,11 +1481,9 @@ 
org.apache.ignite.internal.processors.cluster.ClusterMetricsUpdateMessage
 org.apache.ignite.internal.processors.cluster.ClusterNodeMetrics
 org.apache.ignite.internal.processors.cluster.ClusterProcessor$4
 org.apache.ignite.internal.processors.cluster.ClusterProcessor$4$1
-org.apache.ignite.internal.processors.cluster.DiscoveryDataClusterState
 org.apache.ignite.internal.processors.cluster.GridClusterStateProcessor$1$1
 org.apache.ignite.internal.processors.cluster.GridClusterStateProcessor$2
 org.apache.ignite.internal.processors.cluster.GridClusterStateProcessor$4
-org.apache.ignite.internal.processors.cluster.GridClusterStateProcessor$BaselineStateAndHistoryData
 
org.apache.ignite.internal.processors.cluster.baseline.autoadjust.BaselineAutoAdjustStatus$TaskState
 
org.apache.ignite.internal.processors.configuration.distributed.DetachedPropertyException
 
org.apache.ignite.internal.processors.configuration.distributed.DistributedConfigurationProcessor$2

Reply via email to