nodece commented on code in PR #24376:
URL: https://github.com/apache/pulsar/pull/24376#discussion_r2131389800


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/Consumer.java:
##########
@@ -596,6 +597,8 @@ private CompletableFuture<Long> 
individualAckNormal(CommandAck ack, Map<String,
                 if (checkCanRemovePendingAcksAndHandle(ackOwnerConsumer, 
position, msgId)) {
                     addAndGetUnAckedMsgs(ackOwnerConsumer, -(int) ackedCount);
                     updateBlockedConsumerOnUnackedMsgs(ackOwnerConsumer);
+                } else if (Subscription.isCumulativeAckMode(subType)) {

Review Comment:
   @berg223 Apologies for the earlier incorrect review.
   
   I'm concerned that if we don't improve `checkCanRemovePendingAcksAndHandle`, 
the unacknowledged message count may become inaccurate.
   
   > It's not conformed to the name of the method if we return true for 
exclusive model.
   
   That's a fair point—no worries.
   
   > So may I leave an else branch here for now?
   
   Please remove the `else` branch, as that code path is unreachable and could 
lead to confusion.
   



-- 
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-unsubscr...@pulsar.apache.org

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

Reply via email to