aloyszhang commented on code in PR #23285: URL: https://github.com/apache/pulsar/pull/23285#discussion_r1756283866
########## pulsar-broker/src/main/java/org/apache/pulsar/client/impl/RawBatchConverter.java: ########## @@ -52,12 +52,14 @@ public static boolean isReadableBatch(MessageMetadata metadata) { return metadata.hasNumMessagesInBatch() && metadata.getEncryptionKeysCount() == 0; } - public static List<MessageCompactionData> extractMessageCompactionData(RawMessage msg) + public static List<MessageCompactionData> extractMessageCompactionData(RawMessage msg, MessageMetadata metadata) throws IOException { checkArgument(msg.getMessageIdData().getBatchIndex() == -1); ByteBuf payload = msg.getHeadersAndPayload(); - MessageMetadata metadata = Commands.parseMessageMetadata(payload); + if (metadata == null) { + metadata = Commands.parseMessageMetadata(payload); Review Comment: Yes, you're right. I missed it before. -- 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: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org