zzzming commented on a change in pull request #6052: [PIP-54] Acknowledgement
for batch message local index
URL: https://github.com/apache/pulsar/pull/6052#discussion_r378962288
##########
File path:
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/Consumer.java
##########
@@ -219,7 +226,8 @@ public ChannelPromise sendMessages(final List<Entry>
entries, EntryBatchSizes ba
}
// reduce permit and increment unackedMsg count with total number of
messages in batch-msgs
- MESSAGE_PERMITS_UPDATER.addAndGet(this, -totalMessages);
+ int ackedCount = batchIndexesAcks == null ? 0 :
batchIndexesAcks.getTotalAckedIndexCount();
+ MESSAGE_PERMITS_UPDATER.addAndGet(this, ackedCount - totalMessages);
Review comment:
Would this case be covered if the total number of messages in a batch is
greater the allowed number of permits? Or is this not even possible?
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services