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/11/11 07:22:38 UTC
(pulsar) branch branch-3.1 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-3.1
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/branch-3.1 by this push:
new d386d14505a [fix][ml] Fix unfinished callback when deleting managed ledger (#21530)
d386d14505a is described below
commit d386d14505ae3db627c0cce3dafd44c00b575caa
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 9107b76c88a..1bb23912b5e 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
@@ -880,7 +880,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;
});
}