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


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/metastorage/persistence/DistributedMetaStorageClusterNodeData.java:
##########
@@ -17,51 +17,85 @@
 
 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 Distributed MetaStorage's key-value pairs.
+ * 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;
-
-    /**
-     * Distributed metastorage version of cluster. If {@link #fullData} is not 
null then this version corresponds to
-     * its content.
-     */
-    public final DistributedMetaStorageVersion ver;
-
-    /**
-     * Full data is sent if there's not enough history items on local node.
-     */
-    public final DistributedMetaStorageKeyValuePair[] fullData;
-
-    /**
-     * Required updates for joining nodes or full available history of local 
node if {@link #fullData} is
-     * not {@code null}.
-     */
-    public final DistributedMetaStorageHistoryItem[] hist;
-
-    /**
-     * Additional updates. Makes sence only if {@link #fullData} is not {@code 
null}.
-     */
-    public DistributedMetaStorageHistoryItem[] updates;
+public class DistributedMetaStorageClusterNodeData implements Message {
+    /** @see DistributedMetaStorageVersion#id */
+    @Order(0)
+    @GridToStringInclude
+    long dVerId;
+
+    /** @see DistributedMetaStorageVersion#hash */
+    @Order(1)
+    @GridToStringInclude
+    long dVerHash;
+
+    /** Array of the full data keys. */
+    @GridToStringInclude
+    @Order(2)
+    @Nullable String[] fullDataKeys;
+
+    /** Arrays of the full data bytes. */
+    @GridToStringInclude
+    @Order(3)
+    @Nullable byte[][] fullDataValsBytes;
+
+    /** Required updates for joining nodes or full available history of local 
node if the full data is not {@code null}. */
+    @Order(4)
+    @Nullable DistributedMetaStorageHistoryItemMessage[] hist;
+
+    /** Additional updates. Makes sence only if the full data is not {@code 
null}. */

Review Comment:
   sence -> sense



-- 
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