Shoothzj commented on a change in pull request #11906:
URL: https://github.com/apache/pulsar/pull/11906#discussion_r701667065



##########
File path: 
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java
##########
@@ -907,6 +908,7 @@ protected WriteInEventLoopCallback 
newObject(Handle<WriteInEventLoopCallback> ha
                     log.info("[{}] [{}] Closed Producer", topic, producerName);
                     setState(State.Closed);
                     pendingMessages.forEach(msg -> {
+                        
client.getMemoryLimitController().releaseMemory(msg.uncompressedSize);

Review comment:
       You are right, we should also call `msg.sendComplete(ex)` too,  I can 
fix it after this PR being `merged`




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