labuladong commented on code in PR #19348:
URL: https://github.com/apache/pulsar/pull/19348#discussion_r1090132612
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/Consumer.java:
##########
@@ -473,6 +473,11 @@ private CompletableFuture<Long>
individualAckNormal(CommandAck ack, Map<String,
long ackedCount = 0;
long batchSize = getBatchSize(msgId);
Consumer ackOwnerConsumer =
getAckOwnerConsumer(msgId.getLedgerId(), msgId.getEntryId());
+ if (Subscription.isIndividualAckMode(ackOwnerConsumer.subType())
+ &&
!ackOwnerConsumer.getPendingAcks().containsKey(msgId.getLedgerId(),
msgId.getEntryId())) {
+ // this message has been acked, skip to keep stats correct
+ continue;
+ }
Review Comment:
I don't understand, if the actual consumer is another consumer,
`addAndGetUnAckedMsgs` can update the unack count of that consumer:
https://github.com/apache/pulsar/blob/96fb7dab7a1bc260d8ee3c9d5df15de6863ee15b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/Consumer.java#L1049-L1060
--
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]