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

shards: selectRepoSet supports queries which are not wrapped in and #751

Merged
merged 1 commit into from
Mar 27, 2024

Conversation

keegancsmith
Copy link
Member

The previous commit which added support for selectRepoSet in List was ineffective since the queries we get for List do not look like (and ...) but instead directly specify the reposet atom.

This commit adds support for it. Additionally to help with our manual testing we add support for "repo:" query in the selectRepoSet optimization.

While pairing on this we decided to improve the debug output to tracing and rename the misnamed query.Q variable in List from r to q.

Test Plan: updated the test case to directly test the sort of queries we get in List calls. Additionally ran "zoekt-webserver -pprof" and observed in net/trace output that selectRepoSet optimization reduced the number of searched shards.

The previous commit which added support for selectRepoSet in List was
ineffective since the queries we get for List do not look like (and ...)
but instead directly specify the reposet atom.

This commit adds support for it. Additionally to help with our manual
testing we add support for "repo:" query in the selectRepoSet
optimization.

While pairing on this we decided to improve the debug output to tracing
and rename the misnamed query.Q variable in List from r to q.

Test Plan: updated the test case to directly test the sort of queries we
get in List calls. Additionally ran "zoekt-webserver -pprof" and
observed in net/trace output that selectRepoSet optimization reduced the
number of searched shards.

Co-authored-by: Stefan Hengl <[email protected]>
@keegancsmith keegancsmith merged commit 7621acc into main Mar 27, 2024
7 of 8 checks passed
@keegancsmith keegancsmith deleted the k/select-repo-set branch March 27, 2024 10:13
keegancsmith added a commit that referenced this pull request Mar 27, 2024
…751)

The previous commit which added support for selectRepoSet in List was
ineffective since the queries we get for List do not look like (and ...)
but instead directly specify the reposet atom.

This commit adds support for it. Additionally to help with our manual
testing we add support for "repo:" query in the selectRepoSet
optimization.

While pairing on this we decided to improve the debug output to tracing
and rename the misnamed query.Q variable in List from r to q.

Test Plan: updated the test case to directly test the sort of queries we
get in List calls. Additionally ran "zoekt-webserver -pprof" and
observed in net/trace output that selectRepoSet optimization reduced the
number of searched shards.

Co-authored-by: Stefan Hengl <[email protected]>
(cherry picked from commit 7621acc)
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.

2 participants