lhotari commented on code in PR #25581:
URL: https://github.com/apache/pulsar/pull/25581#discussion_r3146459266


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/Consumer.java:
##########
@@ -1132,19 +1133,20 @@ public PendingAcksMap getPendingAcks() {
      * @param markDeleteLedgerId the ledger ID up to which to remove pending 
acks
      * @param markDeleteEntryId the entry ID up to which to remove pending acks
      */
-    public void removePendingAcksUpToAndCountUnacked(long markDeleteLedgerId, 
long markDeleteEntryId) {
+    public void removePendingAcksUpToPositionAndDecrementUnacked(long 
markDeleteLedgerId, long markDeleteEntryId) {
         if (pendingAcks == null) {
             return;
         }
 
-        int[] totalUnacked = {0};
+        AtomicInteger atomicTotalUnacked = new AtomicInteger(0);

Review Comment:
   `org.apache.commons.lang3.mutable.MutableInt` would be sufficient in this 
use case since there's no asynchronous or concurrent handling of the pending 
acks.



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

Reply via email to