This repository was archived by the owner on Apr 1, 2024. It is now read-only.
ISSUE-13238: Should introduce deleting state for ledger deletion #3406
Labels
help wanted
Extra attention is needed
help-wanted
lifecycle/stale
Stale
type/enhancement
type/improvement
Original Issue: apache#13238
Is your enhancement request related to a problem? Please describe.
In current ledger deletion, we divided it into two separate steps.
Due to the separate step, we can't ensure the ledger deletion transaction. If the first step succeed and the second step failed, it will lead to ledgers can't be deleted from storage system forever. The second step maybe fail by broker restart or storage system deletion failed.
https://github.com/apache/pulsar/blob/bd68b6f05f9749328701c59bdaf3cddda2254d39/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java#L2532-L2561
In our customer's environment, we have found many orphan ledgers cause by the above reason.
Describe the solution you'd like
We'd better introduce a
deleting
state for the waiting to delete ledgers. The desired ledger deletion should follow the three steps.deleting
state.deleting
state ledgers, and do ledger delete operation on storage system. Each topic's owner control their own topics' ledger deletion.The text was updated successfully, but these errors were encountered: