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 and Technoboy- committed Dec 3, 2023
1 parent a280bd7 commit bd9b50f
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,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 bd9b50f

Please sign in to comment.