-
Notifications
You must be signed in to change notification settings - Fork 25k
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
[Tests] Fix expectations around shouldPreFilterSearchShards #55522
Conversation
In the documentation of `pre_filter_shard_size` we state that the pre-filter phase will be executed if the request targets more than 128 shards, yet in the current test randomization we check that the TransportSearchAction.shouldPreFilterSearchShards is true already for 127 targeted shards. This should be raised to 129 instead. Closes elastic#55514
Pinging @elastic/es-search (:Search/Search) |
assertTrue(TransportSearchAction.shouldPreFilterSearchShards(clusterState, searchRequest, | ||
indices, randomIntBetween(127, 10000))); | ||
indices, randomIntBetween(129, 10000))); |
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.
I'm not exactly sure whether this should be 129 or 128, the way I read the docs I would understand them to not run pre-filter phase if <=128, but I might be wrong here. Please let me know what you think is right.
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.
looking at the code it would seem 129, but I would try to run the test with a static value just to be 200% sure.
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.
That I already did, I was just wondering what the expectations are of the code should be changed to "<=" in the appropriate place. Thanks.
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, thanks @cbuescher !
In the documentation of `pre_filter_shard_size` we state that the pre-filter phase will be executed if the request targets more than 128 shards, yet in the current test randomization we check that the TransportSearchAction.shouldPreFilterSearchShards is true already for 127 targeted shards. This should be raised to 129 instead. Closes #55514
In the documentation of `pre_filter_shard_size` we state that the pre-filter phase will be executed if the request targets more than 128 shards, yet in the current test randomization we check that the TransportSearchAction.shouldPreFilterSearchShards is true already for 127 targeted shards. This should be raised to 129 instead. Closes #55514
In the documentation of
pre_filter_shard_size
we state that the pre-filterphase will be executed if the request targets more than 128 shards, yet in the
current test randomization we check that the
TransportSearchAction.shouldPreFilterSearchShards is true already for 127
targeted shards. This should be raised to 129 instead.
Closes #55514