merlimat commented on a change in pull request #619: make batch-ack thread-safe URL: https://github.com/apache/incubator-pulsar/pull/619#discussion_r130761843
########## File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java ########## @@ -377,7 +379,6 @@ boolean markAckForBatchMessage(BatchMessageIdImpl batchMessageId, AckType ackTyp ackMessagesInEarlierBatch(batchMessageId, message); } if (log.isDebugEnabled()) { - int outstandingAcks = batchMessageAckTracker.get(message).cardinality(); Review comment: Since this is only needed for debug, could we just re-acquire the lock here? (or don't even care about it). I think `bitSet.cardinality()` might be expensive in that it's kind of `O(n)` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services