Technoboy- opened a new pull request #14260: URL: https://github.com/apache/pulsar/pull/14260
### Motivation When consumers set `enableBatchIndexAcknowledgment=true`, client will execute PersistentAcknowledgmentsGroupingTracker#doIndividualBatchAckAsync : https://github.com/apache/pulsar/blob/8928c3496a61c588b50461d6adaab089dd421619/pulsar-client/src/main/java/org/apache/pulsar/client/impl/PersistentAcknowledgmentsGroupingTracker.java#L357-L372 There is an error in line 367, it should be `value.set(0, batchMessageId.getBatchSize()); ` But batchMessageId.getBatchSize() always return acker.getBatchSize(): https://github.com/apache/pulsar/blob/8928c3496a61c588b50461d6adaab089dd421619/pulsar-client/src/main/java/org/apache/pulsar/client/impl/BatchMessageIdImpl.java#L137-L139 If line 362 is false, BatchMessageIdImpl only has acker with BatchMessageAckerDisabled which batch is always 0. So I have added `getOriginalBatchSize` to return the user-specified batch size. Then, when print logs in line 556, `pendingIndividualBatchIndexAcks` is always empty. Should replace with `entriesToAck` ### Documentation - [x] `no-need-doc` -- 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]
