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 nodece committed Feb 23, 2024
1 parent d774897 commit fc8c3e6
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,10 @@ public void asyncDelete(String name, DeleteLedgerCallback callback, Object ctx)
// 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 fc8c3e6

Please sign in to comment.