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

[Tests] Fix expectations around shouldPreFilterSearchShards #55522

Merged
merged 1 commit into from
Apr 21, 2020

Conversation

cbuescher
Copy link
Member

@cbuescher cbuescher commented Apr 21, 2020

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 elastic#55514
@cbuescher cbuescher added :Search/Search Search-related issues that do not fall into other categories >test-failure Triaged test failures from CI labels Apr 21, 2020
@cbuescher cbuescher requested a review from jimczi April 21, 2020 11:26
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (:Search/Search)

assertTrue(TransportSearchAction.shouldPreFilterSearchShards(clusterState, searchRequest,
indices, randomIntBetween(127, 10000)));
indices, randomIntBetween(129, 10000)));
Copy link
Member Author

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.

Copy link
Member

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.

Copy link
Member Author

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.

Copy link
Contributor

@jimczi jimczi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @cbuescher !

@cbuescher cbuescher merged commit 30d8e1f into elastic:master Apr 21, 2020
cbuescher pushed a commit that referenced this pull request Apr 21, 2020
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
cbuescher pushed a commit that referenced this pull request Apr 21, 2020
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Search/Search Search-related issues that do not fall into other categories >test-failure Triaged test failures from CI v7.7.1 v7.8.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CI] TransportSearchActionTests.testShouldPreFilterSearchShards reproducibly fails
5 participants