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 4, 2023
1 parent 9f0b090 commit 207c20d
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 207c20d

Please sign in to comment.