sergey-chugunov-1985 commented on code in PR #12425:
URL: https://github.com/apache/ignite/pull/12425#discussion_r2447471336


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/binary/MetadataResponseMessage.java:
##########
@@ -16,180 +16,111 @@
  */
 package org.apache.ignite.internal.processors.cache.binary;
 
-import java.nio.ByteBuffer;
+import org.apache.ignite.internal.Order;
 import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.plugin.extensions.communication.Message;
-import org.apache.ignite.plugin.extensions.communication.MessageReader;
-import org.apache.ignite.plugin.extensions.communication.MessageWriter;
 
 /**
  * Carries latest version of metadata to client as a response for {@link 
MetadataRequestMessage}.
  */
 public class MetadataResponseMessage implements Message {
-    /** */
+    /** Response status if any exception happened during preparing response. */
+    private static final byte ERROR = -1;

Review Comment:
   It seems we could get rid of this status. It is never used on a receiver 
side.
   
   In that case we could get rid of other statuses too and analyze just 
presence of `metaVerInfo`.



##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/binary/BinaryMetadataVersionInfo.java:
##########
@@ -17,36 +17,55 @@
 package org.apache.ignite.internal.processors.cache.binary;
 
 import java.io.Serializable;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.internal.GridKernalContext;
+import org.apache.ignite.internal.Order;
 import org.apache.ignite.internal.binary.BinaryMetadata;
+import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.plugin.extensions.communication.Message;
 
 /**
  * Wrapper for {@link BinaryMetadata} which is stored in metadata local cache 
on each node.
  * Used internally to track version counters (see javadoc for {@link 
MetadataUpdateProposedMessage} for more details).
  * The version refers solely to the internal protocol for updating 
BinaryMetadata and is unknown externally.
  * It can be updated dynamically from different nodes and threads on the same 
node.
  */
-final class BinaryMetadataVersionInfo implements Serializable {
+public final class BinaryMetadataVersionInfo implements Serializable, Message {
+    /** Type code. */
+    public static final short TYPE_CODE = 505;
+
     /** */
     private static final long serialVersionUID = 0L;
 
     /** The actual binary metadata. */
-    private final BinaryMetadata metadata;
+    private BinaryMetadata metadata;
+
+    /** Serialized binary metadata. */
+    @Order(0)
+    private byte[] metadataBytes;

Review Comment:
   I suggest adding `transient` on this new field to possibly reduce amount of 
data transferred over the network e.g. on node join.



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