-
Notifications
You must be signed in to change notification settings - Fork 827
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
segment ring for fair pruning #7343
Labels
A-pruning
Related to pruning or full node
C-enhancement
New feature or request
M-prevent-stale
Prevents old inactive issues/PRs from being closed due to inactivity
Comments
emhane
added
C-bug
An unexpected or incorrect behavior
A-pruning
Related to pruning or full node
labels
Mar 26, 2024
Merged
This issue is stale because it has been open for 21 days with no activity. |
github-actions
bot
added
the
S-stale
This issue/PR is stale and will close with no further activity
label
Apr 17, 2024
onbjerg
removed
the
S-stale
This issue/PR is stale and will close with no further activity
label
Apr 17, 2024
emhane
added
the
M-prevent-stale
Prevents old inactive issues/PRs from being closed due to inactivity
label
Apr 17, 2024
emhane
changed the title
chore(prune): segment ring for fair pruning
segment ring for fair pruning
May 8, 2024
shekhirin
added
C-enhancement
New feature or request
and removed
C-bug
An unexpected or incorrect behavior
labels
May 9, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-pruning
Related to pruning or full node
C-enhancement
New feature or request
M-prevent-stale
Prevents old inactive issues/PRs from being closed due to inactivity
Describe the feature
Segment pruning always starts with the same segment. Last segments in the iterator, risk not being pruned if the prune limit is small so it's often reached before pruning is done. We should implement a ring here: add a field to
Pruner
where we save the index in the chained segments iterator, of the last pruned segment. Upon callingprune_segments
next time, the iterator should skip until the saved index + 1.reth/crates/prune/src/pruner.rs
Lines 141 to 145 in c04dbe6
This will probably require modifying
static_file_segments
method, since it's important that no segments that need pruning are dropped when the iterator skips ahead to the last pruned segment.reth/crates/prune/src/pruner.rs
Lines 215 to 243 in c04dbe6
Additional context
No response
The text was updated successfully, but these errors were encountered: