zzzming commented on a change in pull request #6052: [PIP-54] Acknowledgement
for batch message local index
URL: https://github.com/apache/pulsar/pull/6052#discussion_r378893278
##########
File path:
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java
##########
@@ -2631,5 +2735,16 @@ public void trimDeletedEntries(List<Entry> entries) {
|| individualDeletedMessages.contains(entry.getLedgerId(),
entry.getEntryId()));
}
+ @Override
+ public long[] getDeletedBatchIndexesLongArray(PositionImpl position) {
+ lock.readLock().lock();
+ try {
+ BitSet bitSet = batchDeletedIndexes.get(position);
Review comment:
Ditto. I think only batchDeleteIndexes.get() part should be locked. Again,
double check with concurrentSkipList get() if it is already a thread safe data
struct in terms of read. I think it should although I have never used this map
collection.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services