Skip to content

Fix RandomSamplerAggregatorTests testAggregationSamplingNestedAggsScaled test failure#89958

Merged
martijnvg merged 1 commit intoelastic:mainfrom
martijnvg:fix_test_failure_89818
Sep 9, 2022
Merged

Fix RandomSamplerAggregatorTests testAggregationSamplingNestedAggsScaled test failure#89958
martijnvg merged 1 commit intoelastic:mainfrom
martijnvg:fix_test_failure_89818

Conversation

@martijnvg
Copy link
Copy Markdown
Member

@martijnvg martijnvg commented Sep 9, 2022

This test indexes 150 documents. In case the test index has a high number of segments, it can happen that no documents get sampled. I think this is expected behaviour in this case.

A more detailed explanation of how this failure can happen: #89818 (comment)

This commit adds a special case for this situation, by expecting other counts to be 0 if sampled doc count is 0 as well.

Closes #89818

…led test failure

This test indexes 150 documents. In case the test index has a high number of shards,
it can happen that no documents get sampled. I think this is expected behaviour in this case.

This commit adds a special case for this situation, by expected other counts to be 0 if sampled
doc count is 0 as well.

Closes elastic#89818
@martijnvg martijnvg added >test Issues or PRs that are addressing/adding tests :Analytics/Aggregations Aggregations labels Sep 9, 2022
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-analytics-geo (Team:Analytics)

@elasticsearchmachine elasticsearchmachine added v8.5.0 Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) labels Sep 9, 2022
Copy link
Copy Markdown
Member

@not-napoleon not-napoleon left a comment

Choose a reason for hiding this comment

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

LGTM. I do wonder if we should return an error, or at least a warning, if the sampler ever gets zero docs. @benwtrent is on parental leave right now, but might be worth discussing with him when he gets back.

@martijnvg
Copy link
Copy Markdown
Member Author

I do wonder if we should return an error, or at least a warning, if the sampler ever gets zero docs.

Salvatore and I were also doubting about what desired behaviour should be in this case. I think it makes to discuss this later. Should I open a team discuss issue for this?

@martijnvg
Copy link
Copy Markdown
Member Author

@elasticmachine run elasticsearch-ci/rest-compatibility

@martijnvg
Copy link
Copy Markdown
Member Author

Odd rest compat build did succeed according to logs...

BUILD SUCCESSFUL in 10m 12s |  
-- | --
  | 854 actionable tasks: 643 executed, 211 from cache

@martijnvg martijnvg merged commit 258833f into elastic:main Sep 9, 2022
weizijun added a commit to weizijun/elasticsearch that referenced this pull request Sep 9, 2022
* main: (176 commits)
  Fix RandomSamplerAggregatorTests testAggregationSamplingNestedAggsScaled test failure (elastic#89958)
  [Downsampling] Replace document map with SMILE encoded doc (elastic#89495)
  Remove full cluster state from error logging in MasterService (elastic#89960)
  [ML] Truncate categorization fields (elastic#89827)
  [TSDB] Removed `summary` and `histogram` metric types (elastic#89937)
  Update testNodeSelectorRouting so that it does not depend on iteration order (elastic#89879)
  Make sure listener is resolved when file queue is cleared (elastic#89929)
  [Stable plugin api] Extensible annotation (elastic#89903)
  Fix double sending of response in TransportOpenIdConnectPrepareAuthenticationAction (elastic#89930)
  Make sure ivy repo directory exists before downloading artifacts
  Use 'file://' scheme for local repository URL
  Use DRA artifacts for release build CI jobs
  Log unsuccessful attempts to get credentials from web identity tokens (elastic#88241)
  Script: Write Field API path manipulation (elastic#89889)
  Fetch health info action (elastic#89820)
  Fix memory leak in TransportDeleteExpiredDataAction (elastic#89935)
  [ML] Performance improvements for categorization jobs (elastic#89824)
  [DOCS] Revert changes for ES_JAVA_OPTS (elastic#89931)
  Fix deadlock bug exposed by a test (elastic#89934)
  [Downsampling] Remove `FieldValueFetcher` validator (elastic#89497)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/Aggregations Aggregations Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) >test Issues or PRs that are addressing/adding tests v8.5.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CI] RandomSamplerAggregatorTests testAggregationSamplingNestedAggsScaled failing

3 participants