-
Notifications
You must be signed in to change notification settings - Fork 22
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
Make rewriting the mirror when resyncing configurable #2030
Conversation
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 getting this sorted in such short time 🍻
@@ -55,6 +55,8 @@ type Ingest struct { | |||
// MinimumKeyLengt causes any multihash, that has a digest length less than | |||
// this, to be ignored. | |||
MinimumKeyLength int | |||
// OverwriteMirrorOnResync overwrites the advertisement when resyncing. | |||
OverwriteMirrorOnResync bool |
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.
At some point we probably this configurable per admin sync --resync
command as well?
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.
Agree, but that will slightly more complicated because of how the resync flag is passed through. I can do that in a separate PR. #2031
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.
Totally; separate all PRs ✊
Codecov ReportPatch coverage:
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## main #2030 +/- ##
==========================================
+ Coverage 47.75% 47.94% +0.19%
==========================================
Files 94 94
Lines 10286 10286
==========================================
+ Hits 4912 4932 +20
+ Misses 4806 4782 -24
- Partials 568 572 +4
☔ View full report in Codecov by Sentry. |
When resyncing, sometimes we want to rewrite the mirror, usually we do not.
We may want to rewrite the mirror to get rid of the deleted multihash data that is not needed or to re-encode or compress differently. Usually, we will only want to read existing CAR files from the mirror when resyncing.