You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by te...@apache.org on 2023/12/03 11:10:14 UTC
(pulsar) branch branch-2.11 updated: [fix][ml] Fix unfinished callback when deleting managed ledger (#21530)
This is an automated email from the ASF dual-hosted git repository.
technoboy pushed a commit to branch branch-2.11
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/branch-2.11 by this push:
new bd9b50f36aa [fix][ml] Fix unfinished callback when deleting managed ledger (#21530)
bd9b50f36aa is described below
commit bd9b50f36aaf200028108e05e1f7cd15b4c955d2
Author: Qiang Zhao <ma...@apache.org>
AuthorDate: Fri Nov 10 19:14:39 2023 +0800
[fix][ml] Fix unfinished callback when deleting managed ledger (#21530)
---
.../org/apache/bookkeeper/mledger/impl/ManagedLedgerFactoryImpl.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerFactoryImpl.java b/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerFactoryImpl.java
index a2bc84728cc..0879bbe1cb1 100644
--- a/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerFactoryImpl.java
+++ b/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerFactoryImpl.java
@@ -848,7 +848,10 @@ public class ManagedLedgerFactoryImpl implements ManagedLedgerFactory {
// 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;
});
}