forked from apache/pulsar
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PIP 81] Part-1 Split createNewMetadataLedger into multiple methods f…
…or reuse (apache#15425) ### Motivation It is difficult to get CR due to so many modifications in PIP 81 apache#10729. So I split this PR into multiple sub-PRs to facilitate CR ### Modifications I split the logic in createNewMetadataLedger into multiple methods to facilitate subsequent reuse 1. Put the logic of creating Ledger into `doCreateNewMetadataLedger` separately 2. `switchToNewLedger` does not need to wrap another layer of callback, so remove redundant wrapping 3. When persisting data fails, we need to delete the created Ledger, this part of the logic is put into `deleteLedger` ### Verifying this change This modification does not change any previous behavior, so no unit tests are required, but the previous unit tests must be ensured to pass
- Loading branch information
Showing
1 changed file
with
58 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters