Skip to content

Commit

Permalink
[fix][ml] Fix unfinished callback when deleting managed ledger (#21530)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattisonchao authored Nov 10, 2023
1 parent 2efef87 commit a8f22d8
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,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 a8f22d8

Please sign in to comment.