You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/05/07 08:26:49 UTC

[GitHub] [pulsar] MarvinCai commented on a change in pull request #9663: Fix Pulsar SQL query compression data

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:
users@infra.apache.org