-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
feat(pruner): shared deletion limit #4880
Conversation
Codecov Report
... and 38 files with indirect coverage changes
Flags with carried forward coverage won't be shown. Click here to find out more.
|
66068fd
to
95ea72e
Compare
95ea72e
to
9d0e897
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the explanation makes sense to me.
style nits.
haven't reviewed the provider changes in detail yet, ptal @joshieDo
b257d39
to
7268a77
Compare
7268a77
to
3356ddf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
PR itself lgtm. |
With the addition of headers and transactions pruning for the needs of snapshots, it becomes even harder to manage the batch sizes for pruner, so we both not hit the MDBX freelist issues and still prune the data.
This PR refactors the batch sizes into one shared limit for maximum number of deleted entries per pruner run. Each prune part deletes as much as possible, it decreases the deletion limit, and further parts use new limit. It also means that prune parts now have different priority, because e.g. if receipts, which are pruned first, consume the deletion limit fully, consequent parts won't prune anything.
Tested on both mainnet and sepolia, example log
2023-10-04T18:12:00.521326Z INFO reth::node::events: Pruner finished tip_block_number=4424545 elapsed=899.944121ms parts={SenderRecovery: (Finished, 0), Receipts: (Finished, 0), ContractLogs: (Finished, 2588), AccountHistory: (Finished, 2976), StorageHistory: (Finished, 18652)}