Skip to content
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.#27498
yhchiang-sol wants to merge 1 commit intosolana-labs:masterfrom
yhchiang-sol:lowest-confirmed-slot

Conversation

@yhchiang-sol
Copy link
Copy Markdown
Contributor

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.

@yhchiang-sol yhchiang-sol marked this pull request as draft August 31, 2022 22:30
@yhchiang-sol
Copy link
Copy Markdown
Contributor Author

Turns out that ledger_cleanup_service already honors the root that it never tries to delete anything newer than the root.
Closing the PR.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant