This repository was archived by the owner on Jan 22, 2025. It is now read-only.
Make ledger cleanup service honor the replay progress.#27498
Closed
yhchiang-sol wants to merge 1 commit intosolana-labs:masterfrom
yhchiang-sol:lowest-confirmed-slot
Closed
Make ledger cleanup service honor the replay progress.#27498yhchiang-sol wants to merge 1 commit intosolana-labs:masterfrom yhchiang-sol:lowest-confirmed-slot
yhchiang-sol wants to merge 1 commit intosolana-labs:masterfrom
yhchiang-sol:lowest-confirmed-slot
Conversation
Contributor
Author
|
Turns out that ledger_cleanup_service already honors the root that it never tries to delete anything newer than the root. |
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Problem
The current ledger cleanup service does not honor the replay progress.
As a result, if the replay progress is behind the configured --limit-ledger-size,
then ledger cleanup service might cleanup those slots that are older than
the --limit-ledger-size and make those slots unreplayable.
Summary of Changes
This PR makes ledger cleanup service honor the replay progress.
Under the hood, it allows Blockstore to maintain lowest_confirmed_slot,
which is updated upon successful confirm_slot.
A warning message will also be logged when the blockstore is not able
to keep its size under the specified --limit-ledger-size due to the
behind replay progress.