-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PIP 81: Split the individual acknowledgments into multiple entries #10729
Closed
Conversation
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
# Conflicts: # managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java # pulsar-broker/src/test/java/org/apache/pulsar/broker/service/persistent/PersistentTopicTest.java
@315157973 thanks for your contribution. For this PR, do we need to update docs? |
# Conflicts: # pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java # pulsar-broker/src/test/java/org/apache/pulsar/broker/service/persistent/PersistentTopicTest.java
The pr had no activity for 30 days, mark with Stale label. |
4 tasks
codelipenghui
pushed a commit
that referenced
this pull request
May 6, 2022
…or reuse (#15425) ### Motivation It is difficult to get CR due to so many modifications in PIP 81 #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
Closed as stale and conflict. Please rebase and resubmit the patch if it's still relevant. |
15 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
Pulsar persists the individual acknowledgments into Ledger for each subscription.
acknowledgment hole
uses guava range to record.Now a single entry is used to record these holes, but a single entry can not stores more than 5MB data.
Therefore, this PIP stores these holes in different entries separately. And use LRU to ensure low memory usage.
In this way, we can support almost unlimited
acknowledgment hole
.Doc: https://docs.google.com/document/d/1uQtyb8t6X04v2vrSrdGWLFkuCkBcGYZbqK8XsVJ4qkU/edit
Modifications
recover:
recoverFromMultiEntry
recoverFromSingleEntry
persist position to ledger:
persistPositionToMultiEntry
andsaveMarker
persistPositionToSingleEntry
when creating new ledger:
copyLruEntriesToNewLedger
LRU:
RangeSetWrapper#LruTask
Verifying this change
persist position to ledger has 3 chain:
create new ledger has 1 chain:
recover has 1 chain: