horizonzy commented on code in PR #15914:
URL: https://github.com/apache/pulsar/pull/15914#discussion_r906745657
##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java:
##########
@@ -2687,6 +2687,22 @@ public void deleteLedgerFailed(ManagedLedgerException e,
Object ctx) {
@Override
public void asyncDelete(final DeleteLedgerCallback callback, final Object
ctx) {
+ // Truncate to ensure the offloaded data is not orphaned.
+ // Also ensures the BK ledgers are deleted and not just scheduled for
deletion
+ CompletableFuture<Void> truncateFuture = asyncTruncate();
Review Comment:
If we use `asyncTruncate` to trigger delete storage data.
Maybe we should mofidy the code:
https://github.com/apache/pulsar/blob/ce24db11adaf60d9cfb302ce39e76cdc9e43bd2d/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java#L2430-L2434
When the meta data service is not available, should complete with exception.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]