MarvinCai commented on a change in pull request #9663:
URL: https://github.com/apache/pulsar/pull/9663#discussion_r628024456



##########
File path: 
pulsar-common/src/main/java/org/apache/pulsar/common/api/raw/MessageParser.java
##########
@@ -94,7 +94,7 @@ public static void parseMessage(TopicName topicName, long 
ledgerId, long entryId
                 throw new IOException("Cannot parse encrypted message " + 
msgMetadata + " on topic " + topicName);
             }
 
-            uncompressedPayload = uncompressPayloadIfNeeded(topicName, 
msgMetadata, headersAndPayload, ledgerId,
+            uncompressedPayload = uncompressPayloadIfNeeded(topicName, 
msgMetadata, headersAndPayload.retain(), ledgerId,

Review comment:
       Probably better to let `ReferenceCountedMessageMetadata` do both 
`retain` and `release`, else caller forget to call `retain` might cause trouble 
when `ReferenceCountedMessageMetadata` try to do `release`.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to