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/09/03 05:41:26 UTC

[GitHub] [pulsar] michaeljmarshall commented on a change in pull request #11906: Forget to update memory usage on producer close

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



##########
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:
       Do you know if we should also call `msg.sendComplete(ex);` in this block? It seems like these messages would have failed, as the producer is closed and these are pending messages. (This comment is independent of your PR. I'm just asking because I noticed it in the surrounding code while reviewing your PR.)




-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org