Skip to content
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

Merged
merged 2 commits into from
Jun 27, 2023

Conversation

gammazero
Copy link
Collaborator

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.

Copy link
Member

@masih masih left a 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
Copy link
Member

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?

Copy link
Collaborator Author

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

Copy link
Member

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-commenter
Copy link

codecov-commenter commented Jun 27, 2023

Codecov Report

Patch coverage: 50.00% and project coverage change: +0.19 🎉

Comparison is base (c110709) 47.75% compared to head (82b677d) 47.94%.

❗ 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     
Impacted Files Coverage Δ
config/ingest.go 35.00% <ø> (ø)
internal/ingest/ingest.go 71.38% <50.00%> (+2.08%) ⬆️

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@gammazero gammazero merged commit 3f4512a into main Jun 27, 2023
@gammazero gammazero deleted the config-mirrir-overwrite branch June 27, 2023 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants