Skip to content

Conversation

@polyfractal
Copy link
Contributor

The Max Bucket test can potentially return a partial response, where one of the shards suceeds but another fails due to the max_bucket setting. In the case of a partial failure, the status code is 200 OK since some results were returned (with failures listed in the body).

This makes the yaml test fail since it is expecting a 4xx/5xx failure when catching exception messages.

We need to force the test to use a single shard, which will guarantee that the max_bucket setting is tripped for the entire request.

Closes #41947

The Max Bucket test can potentially return a partial response,
where one of the shards suceeds but another fails due to the max_bucket
setting.  In the case of a partial failure, the status code is 200 OK
since some results were returned (with failures listed in the body).

This makes the yaml test fail since it is expecting a 4xx/5xx failure
when catching exception messages.

We need to force the test to use a single shard, which will guarantee
that the max_bucket setting is tripped for the entire request.
@polyfractal polyfractal added >test Issues or PRs that are addressing/adding tests :Analytics/Aggregations Aggregations labels May 8, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-analytics-geo

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, the other solution would be to set allow_partial_search_results to true in the search request but I am fine either way.

@polyfractal
Copy link
Contributor Author

++ allow_partial_search_results: false is a cleaner solution.

@polyfractal polyfractal merged commit a3b1e5f into elastic:master May 9, 2019
polyfractal added a commit to polyfractal/elasticsearch that referenced this pull request May 9, 2019
The Max Bucket test can potentially return a partial response,
where one of the shards suceeds but another fails due to the max_bucket
setting.  In the case of a partial failure, the status code is 200 OK
since some results were returned (with failures listed in the body).

This makes the yaml test fail since it is expecting a 4xx/5xx failure
when catching exception messages.

We need to disallow partial results so that the entire query fails
and we can check for the max_bucket failure.
gurkankaymak pushed a commit to gurkankaymak/elasticsearch that referenced this pull request May 27, 2019
The Max Bucket test can potentially return a partial response,
where one of the shards suceeds but another fails due to the max_bucket
setting.  In the case of a partial failure, the status code is 200 OK
since some results were returned (with failures listed in the body).

This makes the yaml test fail since it is expecting a 4xx/5xx failure
when catching exception messages.

We need to disallow partial results so that the entire query fails
and we can check for the max_bucket failure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/Aggregations Aggregations >test Issues or PRs that are addressing/adding tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CoreWithSecurityClientYamlTestSuiteIT yaml=search.aggregation/240_max_buckets/Max bucket fails reliably

3 participants