-
Notifications
You must be signed in to change notification settings - Fork 108
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(startup): update logic for metadb update on startup, skip unmodi… #2024
feat(startup): update logic for metadb update on startup, skip unmodi… #2024
Conversation
ef00ada
to
6244d31
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #2024 +/- ##
==========================================
- Coverage 92.03% 91.81% -0.22%
==========================================
Files 164 164
Lines 27717 27992 +275
==========================================
+ Hits 25509 25702 +193
- Misses 1635 1691 +56
- Partials 573 599 +26 ☔ View full report in Codecov by Sentry. |
5253414
to
7c9ff33
Compare
b6a7c74
to
186d6c7
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
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.
Overall the approach looks good, but what happens if the contents of the pre-existing buckets does not match the current data?
Let's say for example you do a zot upgrade to a binary built from this PR and the repos in the DB do not have the last updated data/buckets?
@laurentiuNiculae can you summarize your changes/thoughts in this PR ... ideally in the commit msg itself. |
0652b8f
to
98c2b47
Compare
Now we parse just repos who were updated after the server is closed. To do this we:
(1) LastModified refers to the last modified value of the index.json file for the repo |
98c2b47
to
b787c88
Compare
Does boltdb do internal checksums to detect data corruptions? https://github.com/boltdb/bolt/blob/master/errors.go#L23C47-L25C1 |
b787c88
to
077571c
Compare
077571c
to
19770a8
Compare
…fied repos - MetaDB stores the time of the last update of a repo - During startup we check if the layout has been updated after the last recorded change in the db - If this is the case, the repo is parsed and updated in the DB otherwise it's skipped Signed-off-by: Laurentiu Niculae <[email protected]>
19770a8
to
9f32c47
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
…fied repos
What type of PR is this?
Which issue does this PR fix:
What does this PR do / Why do we need it:
If an issue # is not available please add repro steps and logs showing the issue:
Testing done on this change:
Automation added to e2e:
Will this break upgrades or downgrades?
Does this PR introduce any user-facing change?:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.