eolivelli commented on code in PR #16664:
URL: https://github.com/apache/pulsar/pull/16664#discussion_r925763647
##########
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:
what about looking for NotFoundException in the exception chain ?
we should have some utility to traverse the chain and look for a specific
class
--
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]