You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "frankgh (via GitHub)" <gi...@apache.org> on 2026/10/02 16:50:52 UTC

Re: [PR] CEP-45: Migration repair streams can write live SSTables into pending… [cassandra]

frankgh commented on code in PR #5074:
URL: https://github.com/apache/cassandra/pull/5074#discussion_r4167868876


##########
src/java/org/apache/cassandra/net/Message.java:
##########
@@ -910,8 +910,10 @@ private Serializer()
         public <T> void serialize(Message<T> message, DataOutputPlus out, int version) throws IOException
         {
             serializeHeader(message.header, out, version);
-            out.writeUnsignedVInt32(message.payloadSize(version));
-            message.verb().serializer().serialize(message.payload, out, version);
+            int payloadSize = message.payloadSize(version);
+            out.writeUnsignedVInt32(payloadSize);
+            if (payloadSize > 0)
+                message.verb().serializer().serialize(message.payload, out, version);

Review Comment:
   we can, but if the payload size is 0, do we even need the serializer to do any work at all?



-- 
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: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org