rdhabalia opened a new pull request #5442: [pulsar-client] Avoid leak on 
publish failure on batch message
URL: https://github.com/apache/pulsar/pull/5442
 
 
   ### Motivation
   
   Right now, producer-client tries to add batch message into 
batch-message-container and it can throw Error/RuntimeException 
[BatchMessageContainer::add](https://github.com/apache/pulsar/blob/master/pulsar-client/src/main/java/org/apache/pulsar/client/impl/BatchMessageContainerImpl.java#L72)
 eg: `OutOfDirectMemoryError`. In this case, pulsar-client is not releasing 
payload which can leak the memory. SO, make sure to release payload even with 
any error.

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


With regards,
Apache Git Services

Reply via email to