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 2022/08/25 11:36:12 UTC

[GitHub] [pulsar] shibd commented on a diff in pull request #17276: [fix][broker]Fix memoryLimitController currentUsage and MaxQueueSize semaphore leak when batchMessageContainer add message exception

shibd commented on code in PR #17276:
URL: https://github.com/apache/pulsar/pull/17276#discussion_r954855565


##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/BatchMessageContainerImpl.java:
##########
@@ -108,6 +108,8 @@ public boolean add(MessageImpl<?> msg, SendCallback callback) {
                 }
             } catch (Throwable e) {
                 log.error("construct first message failed, exception is ", e);
+                producer.semaphoreRelease(getNumMessagesInBatch());

Review Comment:
   Maybe we need to throw this exception and then let the producer handle this logic.



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