dlg99 commented on code in PR #16664:
URL: https://github.com/apache/pulsar/pull/16664#discussion_r925828232


##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerFactoryImpl.java:
##########
@@ -921,7 +933,20 @@ private CompletableFuture<Void> deleteCursor(BookKeeper 
bkc, String managedLedge
 
         // Delete the cursor ledger if present
         if (cursor.cursorsLedgerId != -1) {
-            cursorLedgerDeleteFuture = 
bkc.newDeleteLedgerOp().withLedgerId(cursor.cursorsLedgerId).execute();
+            cursorLedgerDeleteFuture = 
bkc.newDeleteLedgerOp().withLedgerId(cursor.cursorsLedgerId)
+                    .execute()
+                    .handle((result, ex) -> {
+                        if (ex != null) {

Review Comment:
   This does not work, in this case PulsarLedgerManager returns 
NotFoundException to Bookkeeper's code which remaps it into 
UnexpectedConditionException for the pulsar callback.



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

Reply via email to