gaoran10 commented on a change in pull request #7833:
URL: https://github.com/apache/pulsar/pull/7833#discussion_r478549595



##########
File path: 
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java
##########
@@ -2857,5 +2857,14 @@ private int applyMaxSizeCap(int maxEntries, long 
maxSizeBytes) {
 
         return Math.min(maxEntriesBasedOnSize, maxEntries);
     }
+
+    public void internalInitBatchDeletedIndex(PositionImpl position, int 
totalNumMessageInBatch) {
+        if (!batchDeletedIndexes.containsKey(position)) {
+            BitSetRecyclable bitSetRecyclable = BitSetRecyclable.create();
+            bitSetRecyclable.set(0, totalNumMessageInBatch);
+            batchDeletedIndexes.put(position, bitSetRecyclable);
+        }

Review comment:
       I'll use this method instead.




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


Reply via email to