-
Notifications
You must be signed in to change notification settings - Fork 971
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(share/availability/full): Introduce Q4 trimming for archival nodes #4028
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4028 +/- ##
==========================================
+ Coverage 44.83% 45.09% +0.25%
==========================================
Files 265 309 +44
Lines 14620 22326 +7706
==========================================
+ Hits 6555 10067 +3512
- Misses 7313 11185 +3872
- Partials 752 1074 +322 ☔ View full report in Codecov by Sentry. |
69d8bbe
to
2b062ba
Compare
818fd02
to
9bf0217
Compare
There's currently an annoying edge-case to the solution presented in 6087e64 that wouldn't be able to detect a node that has been previously run with pruner enabled (on older version where archival trimming was not present), and once upgraded to new version, runs without pruning enabled successfully even though it should not be allowed to revert to an archival run. I need to figure out how to prevent this without making a super ugly solution. |
48987f2
to
5612606
Compare
information about the nodes previous run (archival or pruned) and is checked during startup
9be3949
to
f370346
Compare
The solution to the above comment ^ is f370346 |
Looks good. It took me a while to understand migration. I know it is temporary code, so not insisting to change. Perhaps it might be simpler if migration was detected inside nodebuilder? This way It will be easier to remove later, wihtout the need for refactor. Smth like this:
Another thing to consider is lack of archival -> pruned conversion support in the PR. We should reset prunner checkpoint to allow it to Remove Q1 files. |
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.
SGTM
I can move the logic to nodebuilder, yes. |
c4ec028
to
fce29c6
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.
Thank you for dedication for making it better! Happy that we have temporary logic extracted to migration_utils.go. It has its flaws of reimplementing logic for storing previous run, but I don't think it is a big deal, since it will be remove relatively soon.
Added Few optional nits, otherwise Looks good to me!
This PR introduces trimming of
.q4
files outside the sampling window for archival nodes.It also updates the pruner checkpoint such that it's possible to convert from an archival node --> full pruning node but not the other way around (the node runner would need to resync the node in this case).
All deletion logic now lives in either
share/availability/light
orshare/availability/full
but the pruner service is still contained in a separate package and now runs by default as all node types will have some form of pruning happening.