poorbarcode commented on code in PR #18620:
URL: https://github.com/apache/pulsar/pull/18620#discussion_r1194560654


##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/OpReadEntry.java:
##########
@@ -117,6 +119,9 @@ public void readEntriesFailed(ManagedLedgerException 
exception, Object ctx) {
                 return;
             }
             updateReadPosition(nexReadPosition);
+            if (lostLedger != null) {
+                clearIncompleteAckedRecordsFromLedger(lostLedger);

Review Comment:
   fixed



##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java:
##########
@@ -1729,6 +1729,18 @@ synchronized void ledgerClosed(final LedgerHandle lh) {
         }
     }
 
+    @Override
+    public void removeNonRecoverableLedger(long ledgerId){
+        ledgers.remove(ledgerId);
+        Iterator<ManagedCursor> managedCursorIterator = cursors.iterator();
+        while (managedCursorIterator.hasNext()){
+            ManagedCursor managedCursor = managedCursorIterator.next();
+            if (managedCursor instanceof ManagedCursorImpl managedCursorImpl){
+                
managedCursorImpl.clearIncompleteAckedRecordsByLedgerId(ledgerId);

Review Comment:
   fixed



-- 
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: commits-unsubscr...@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to