Skip to content

Commit

Permalink
[fix][ml] Fix unfinished callback when deleting managed ledger (apach…
Browse files Browse the repository at this point in the history
  • Loading branch information
mattisonchao authored and srinath-ctds committed Dec 20, 2023
1 parent 46b699d commit 4c492d1
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,10 @@ public void asyncDelete(String name, CompletableFuture<ManagedLedgerConfig> mlCo
// If it's open, delete in the normal way
ml.asyncDelete(callback, ctx);
}).exceptionally(ex -> {
// If it's failing to get open, just delete from metadata
// If it fails to get open, it will be cleaned by managed ledger opening error handling.
// then retry will go to `future=null` branch.
final Throwable rc = FutureUtil.unwrapCompletionException(ex);
callback.deleteLedgerFailed(getManagedLedgerException(rc), ctx);
return null;
});
}
Expand Down

0 comments on commit 4c492d1

Please sign in to comment.