wernerdv commented on code in PR #13409:
URL: https://github.com/apache/ignite/pull/13409#discussion_r3703941486


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/metastorage/persistence/DistributedMetaStorageClusterNodeData.java:
##########
@@ -17,51 +17,93 @@
 
 package org.apache.ignite.internal.processors.metastorage.persistence;
 
-import java.io.Serializable;
+import java.io.Externalizable;
+import java.util.Map;
+import org.apache.ignite.internal.Order;
+import 
org.apache.ignite.internal.processors.cache.persistence.metastorage.MetaStorage;
+import org.apache.ignite.internal.util.tostring.GridToStringInclude;
+import org.apache.ignite.plugin.extensions.communication.Message;
+import org.jetbrains.annotations.Nullable;
 
 /**
- * Distributed metastorage data that cluster sends to joining node.
+ * Distributed metastorage data that cluster sends to joining node. To reduce 
messages number, contains plain representation
+ * of {@link DistributedMetaStorageVersion}, arrays of plain representations 
of {@link DistributedMetaStorageKeyValuePair}.
+ * And wrapped {@link DistributedMetaStorageHistoryItem}s. The version and the 
full data holders are {@link Externalizable}s
+ * persistent by {@link MetaStorage} with the dedicated code-generated 
serializers. Thus, we do not make them directly a {@link Message}.
+ *
+ * @see DmsDataWriter#write(String, byte[])
+ * @see MetaStorage#write(String, Serializable)
  */
-@SuppressWarnings({"PublicField", "AssignmentOrReturnOfFieldWithMutableType"})
-class DistributedMetaStorageClusterNodeData implements Serializable {
-    /** */
-    private static final long serialVersionUID = 0L;
+public class DistributedMetaStorageClusterNodeData implements Message {
+    /** @see DistributedMetaStorageVersion#id */
+    @Order(0)
+    @GridToStringInclude
+    long dVerId;
 
-    /**
-     * Distributed metastorage version of cluster. If {@link #fullData} is not 
null then this version corresponds to
-     * its content.
-     */
-    public final DistributedMetaStorageVersion ver;
+    /** @see DistributedMetaStorageVersion#hash */
+    @Order(1)
+    @GridToStringInclude
+    long dVerHash;
 
     /**
-     * Full data is sent if there's not enough history items on local node.
+     * Array of the full data keys.
+     *
+     * @see DistributedMetaStorageKeyValuePair#key
      */
-    public final DistributedMetaStorageKeyValuePair[] fullData;
+    @GridToStringInclude
+    @Order(2)
+    @Nullable String[] fullDataKeys;
 
     /**
-     * Required updates for joining nodes or full available history of local 
node if {@link #fullData} is
-     * not {@code null}.
+     * Arrays of the full data bytes.
+     *
+     * @see DistributedMetaStorageKeyValuePair#valBytes

Review Comment:
   After all the changes, the DistributedMetaStorageKeyValuePair class is no 
longer used in production code.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to