tisonkun commented on code in PR #16996:
URL: https://github.com/apache/pulsar/pull/16996#discussion_r940962190


##########
pulsar-common/src/main/java/org/apache/pulsar/common/protocol/Commands.java:
##########
@@ -1850,10 +1850,9 @@ public static MessageMetadata 
peekMessageMetadata(ByteBuf metadataAndPayload, St
             long consumerId) {
         try {
             // save the reader index and restore after parsing
-            int readerIdx = metadataAndPayload.readerIndex();
+            metadataAndPayload.markReaderIndex();
             MessageMetadata metadata = 
Commands.parseMessageMetadata(metadataAndPayload);
-            metadataAndPayload.readerIndex(readerIdx);
-
+            metadataAndPayload.resetReaderIndex();

Review Comment:
   How this change be relevant?



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