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
search: paginated repository resolution (take 2) #27359
Merged
tsenart
merged 9 commits into
main
from
backend-integration/ts/paginated-repo-resolution
Nov 11, 2021
Merged
search: paginated repository resolution (take 2) #27359
tsenart
merged 9 commits into
main
from
backend-integration/ts/paginated-repo-resolution
Nov 11, 2021
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
tsenart
changed the title
Backend integration/ts/paginated repo resolution
search: paginated repository resolution (take 2)
Nov 10, 2021
tsenart
force-pushed
the
backend-integration/ts/paginated-repo-resolution
branch
2 times, most recently
from
November 10, 2021 14:03
b42794d
to
2d6e36f
Compare
Notifying subscribers in CODENOTIFY files for diff db5d3f0...a815d2f.
|
tsenart
force-pushed
the
backend-integration/ts/paginated-repo-resolution
branch
3 times, most recently
from
November 10, 2021 17:07
ef43625
to
aa2a96b
Compare
rvantonder
approved these changes
Nov 10, 2021
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.
unknwon
approved these changes
Nov 11, 2021
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.
Changes to the files that I subscribed LGTM.
This PR is the last of series to introduce paginated repo resolution in search. We remove `backend.ListSearchable` and its use in repository resolution because global searches on Sourcegraph.com no longer depend on it. This in turn simplifies the code in preparation for cursor based pagination. Part of #26995
This commit optimizes the RepoSearch job by leveraging the database to find repos based on the text pattern. Yesterday's production incident was caused by excessive database requests due to our previous brute-force approach of loading all repos and then filtering them in the frontend.
This commit makes our repo stats semantics (in the UI and GraphQL API) mean repositories with matches rather than searched or searchable.
tsenart
force-pushed
the
backend-integration/ts/paginated-repo-resolution
branch
from
November 11, 2021 10:49
1fd5b04
to
cd9ad12
Compare
This reverts commit 23de00e.
stefanhengl
approved these changes
Nov 11, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR is the last of series to introduce paginated repo resolution in search.
New stuff in take 2
run.RepoSearch
to leverage the database for regex matching on repo name, rather than brute-forcing it through all paginated repos. This should address the massive extra DB load we saw in production yesterday.Part of #26995