Jason918 commented on code in PR #18650:
URL: https://github.com/apache/pulsar/pull/18650#discussion_r1033198284


##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java:
##########
@@ -1258,6 +1258,7 @@ void messageReceived(CommandMessage cmdMessage, ByteBuf 
headersAndPayload, Clien
         if (!verifyChecksum(headersAndPayload, messageId)) {
             // discard message with checksum error
             discardCorruptedMessage(messageId, cnx, 
ValidationError.ChecksumMismatch);
+            headersAndPayload.release();

Review Comment:
   The call path here would be 
   - org.apache.pulsar.common.protocol.PulsarDecoder#channelRead
   - org.apache.pulsar.client.impl.ClientCnx#handleMessage
   - org.apache.pulsar.client.impl.ConsumerImpl#messageReceived
   
   But the `headersAndPayload` is released in the `finally` block in 
`channelRead`



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