Technoboy- commented on a change in pull request #13383:
URL: https://github.com/apache/pulsar/pull/13383#discussion_r778584096



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/Consumer.java
##########
@@ -776,6 +863,12 @@ public void 
redeliverUnacknowledgedMessages(List<MessageIdData> messageIds) {
             LongPair longPair = pendingAcks.get(position.getLedgerId(), 
position.getEntryId());
             if (longPair != null) {
                 long batchSize = longPair.first;
+                if (isDeletionAtBatchIndexLevelEnabled()) {
+                    long[] cursorAckSet = getCursorAckSet(position);
+                    if (cursorAckSet != null) {
+                        batchSize -= 
BitSet.valueOf(cursorAckSet).cardinality();

Review comment:
       batchSize -= BitSet.valueOf(cursorAckSet).cardinality() is equals with 
`batchSize = batchSize - BitSet.valueOf(cursorAckSet).cardinality()`.
   And `batchSize - BitSet.valueOf(cursorAckSet).cardinality()` means how many 
un-ack msg count.




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