codelipenghui commented on code in PR #22393:
URL: https://github.com/apache/pulsar/pull/22393#discussion_r1547560860
##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java:
##########
@@ -418,16 +419,14 @@ public void sendComplete(Exception e) {
stats.incrementNumAcksReceived(latencyNanos);
}
} finally {
- interceptorMessage.getDataBuffer().release();
+ ReferenceCountUtil.safeRelease(payloadInCurrentMsg);
Review Comment:
I think the correct fix should be always release the buffer before
completing the future.
It doesn't make sense to allow users to release the message first, and then
we try to touch the message again.
--
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]