-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Implement ArtifactBundle flat file indexing #53505
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
the
Scope: Backend
Automatically applied to PRs that change backend components
label
Jul 25, 2023
Swatinem
force-pushed
the
swatinem/update-bundle-index
branch
from
July 25, 2023 09:25
e8e0535
to
40447eb
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #53505 +/- ##
==========================================
+ Coverage 79.52% 79.55% +0.03%
==========================================
Files 4941 4942 +1
Lines 208882 209073 +191
Branches 35574 35603 +29
==========================================
+ Hits 166119 166338 +219
+ Misses 37696 37656 -40
- Partials 5067 5079 +12
|
loewenheim
reviewed
Jul 25, 2023
loewenheim
approved these changes
Jul 25, 2023
Co-authored-by: Riccardo Busetti <[email protected]>
iambriccardo
approved these changes
Jul 25, 2023
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
chloeho7
pushed a commit
that referenced
this pull request
Jul 25, 2023
The high-level overview is this: - When uploading a new `ArtifactBundle`, we `get_or_create` the `ArtifactBundleFlatFileIndex`, and `update_or_create` the `FlatFileIndexState`, setting it to `NOT_INDEXED`. - Then, using a distributed lock, we read the existing `ArtifactBundleFlatFileIndex`, merging the `ArtifactBundle` into it and updating it, finally setting the `FlatFileIndexState` to `WAS_INDEXED`. As the final step is behind a distributed lock, we can be confident that we don’t have data races. If any error happens during this operation, the `FlatFileIndexState` indicates that indexing still needs to happen. A separate "repair-job" could in the future just query all the `FlatFileIndexState` entries older than X that were not yet indexed, and add them to that index at a later time. --------- Co-authored-by: Riccardo Busetti <[email protected]>
Suspect IssuesThis pull request has been deployed and Sentry has observed the following issues:
Did you find this useful? React with a 👍 or 👎 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Supercedes #52785
The high-level overview is this:
ArtifactBundle
, weget_or_create
theArtifactBundleFlatFileIndex
, andupdate_or_create
theFlatFileIndexState
, setting it toNOT_INDEXED
.ArtifactBundleFlatFileIndex
, merging theArtifactBundle
into it and updating it, finally setting theFlatFileIndexState
toWAS_INDEXED
.As the final step is behind a distributed lock, we can be confident that we don’t have data races.
If any error happens during this operation, the
FlatFileIndexState
indicates that indexing still needs to happen.A separate "repair-job" could in the future just query all the
FlatFileIndexState
entries older than X that were not yet indexed, and add them to that index at a later time.