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

MixedClusterClientYamlTestSuiteIT: Multisearch test with typed_keys parameter for sampler and significant terms failure #57402

Closed
davidkyle opened this issue Jun 1, 2020 · 11 comments · Fixed by #57817
Assignees
Labels
:Analytics/Aggregations Aggregations Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) >test-failure Triaged test failures from CI

Comments

@davidkyle
Copy link
Member

davidkyle commented Jun 1, 2020

Build scan:
https://gradle-enterprise.elastic.co/s/qaucfxmv5kp76

Repro line:

 ./gradlew ':qa:mixed-cluster:v6.8.10#mixedClusterTest' --tests "org.elasticsearch.backwards.MixedClusterClientYamlTestSuiteIT.test {p0=msearch/20_typed_keys/Multisearch test with typed_keys parameter for sampler and significant terms}" \
  -Dtests.seed=A0B72CC161F91CA5 \
  -Dtests.security.manager=true \
  -Dtests.locale=is \
  -Dtests.timezone=Indian/Mahe \
  -Druntime.java=8

Reproduces locally?:
No

Applicable branches:
7.x

Failure history:
Many failures since May 30th all on the 7.x branch in a mixed cluster with 6.8.y

https://build-stats.elastic.co/app/kibana#/discover?_g=(refreshInterval:(pause:!t,value:0),time:(from:now-7d,mode:quick,to:now))&_a=(columns:!(branch),index:e58bf320-7efd-11e8-bf69-63c8ef516157,interval:auto,query:(language:lucene,query:'%22Multisearch%20test%22'),sort:!(time,desc))

Failure excerpt:

java.lang.AssertionError: Failure at [msearch/20_typed_keys:107]: responses.0.aggregations.sampler#test_sampler.sigsterms#test_significant_terms.doc_count didn't match expected value:
responses.0.aggregations.sampler#test_sampler.sigsterms#test_significant_terms.doc_count: expected Integer [5] but was Integer [4]

	at __randomizedtesting.SeedInfo.seed([A0B72CC161F91CA5:28E3131BCF05715D]:0)
	at org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase.executeSection(ESClientYamlSuiteTestCase.java:405)
	at org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase.test(ESClientYamlSuiteTestCase.java:382)
	at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.carrotsearch.randomizedtesting.RandomizedRunner.invoke(RandomizedRunner.java:1750)
	at com.carrotsearch.randomizedtesting.RandomizedRunner$8.evaluate(RandomizedRunner.java:938)
	at com.carrotsearch.randomizedtesting.RandomizedRunner$9.evaluate(RandomizedRunner.java:974)
	at com.carrotsearch.randomizedtesting.RandomizedRunner$10.evaluate(RandomizedRunner.java:988)
	at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
	at org.apache.lucene.util.TestRuleSetupTeardownChained$1.evaluate(TestRuleSetupTeardownChained.java:49)
	at org.apache.lucene.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:45)
	at org.apache.lucene.util.TestRuleThreadAndTestName$1.evaluate(TestRuleThreadAndTestName.java:48)
	at org.apache.lucene.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:64)
	at org.apache.lucene.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:47)
	at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
	at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:368)
	at com.carrotsearch.randomizedtesting.ThreadLeakControl.forkTimeoutingTask(ThreadLeakControl.java:817)
	at com.carrotsearch.randomizedtesting.ThreadLeakControl$3.evaluate(ThreadLeakControl.java:468)
	at com.carrotsearch.randomizedtesting.RandomizedRunner.runSingleTest(RandomizedRunner.java:947)
	at com.carrotsearch.randomizedtesting.RandomizedRunner$5.evaluate(RandomizedRunner.java:832)
	at com.carrotsearch.randomizedtesting.RandomizedRunner$6.evaluate(RandomizedRunner.java:883)
	at com.carrotsearch.randomizedtesting.RandomizedRunner$7.evaluate(RandomizedRunner.java:894)
	at org.apache.lucene.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:45)
	at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
	at org.apache.lucene.util.TestRuleStoreClassName$1.evaluate(TestRuleStoreClassName.java:41)
	at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
	at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
	at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
	at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
	at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
	at org.apache.lucene.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAssertionsRequired.java:53)
	at org.apache.lucene.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:47)
	at org.apache.lucene.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:64)
	at org.apache.lucene.util.TestRuleIgnoreTestSuites$1.evaluate(TestRuleIgnoreTestSuites.java:54)
	at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
	at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:368)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.AssertionError: responses.0.aggregations.sampler#test_sampler.sigsterms#test_significant_terms.doc_count didn't match expected value:
responses.0.aggregations.sampler#test_sampler.sigsterms#test_significant_terms.doc_count: expected Integer [5] but was Integer [4]

	at org.elasticsearch.test.rest.yaml.section.MatchAssertion.doAssert(MatchAssertion.java:93)
	at org.elasticsearch.test.rest.yaml.section.Assertion.execute(Assertion.java:76)
	at org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase.executeSection(ESClientYamlSuiteTestCase.java:398)
	... 37 more
@davidkyle davidkyle added :Search/Search Search-related issues that do not fall into other categories >test-failure Triaged test failures from CI labels Jun 1, 2020
@elasticmachine
Copy link
Collaborator

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

@elasticmachine elasticmachine added the Team:Search Meta label for search team label Jun 1, 2020
davidkyle added a commit that referenced this issue Jun 1, 2020
@davidkyle
Copy link
Member Author

Muted on 7.x in #57406

@jimczi jimczi added the :Analytics/Aggregations Aggregations label Jun 3, 2020
@elasticmachine
Copy link
Collaborator

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

@elasticmachine elasticmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Jun 3, 2020
@jimczi jimczi removed :Search/Search Search-related issues that do not fall into other categories Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) labels Jun 3, 2020
@elasticmachine elasticmachine removed the Team:Search Meta label for search team label Jun 3, 2020
@jimczi jimczi added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Jun 3, 2020
@jimczi
Copy link
Contributor

jimczi commented Jun 3, 2020

@nik9000 could it be related to your recent change on the sig terms agg ?

@nik9000 nik9000 self-assigned this Jun 3, 2020
@nik9000
Copy link
Member

nik9000 commented Jun 3, 2020

I'll take a look!

@nik9000
Copy link
Member

nik9000 commented Jun 3, 2020

Yup. That is me! I've got a fix coming in #57397.

@nik9000
Copy link
Member

nik9000 commented Jun 3, 2020

This reproduces it for me:

while ./gradlew -p qa/mixed-cluster/ clean 'v6.8.10#mixedClusterTest' --tests "*significant terms*"   -Dtests.seed=A0B72CC161F91CA5   -Dtests.security.manager=true   -Dtests.locale=is   -Dtests.timezone=Indian/Mahe   -Druntime.java=8 -i; do echo ok; done

nik9000 added a commit that referenced this issue Jun 4, 2020
@nik9000 nik9000 closed this as completed Jun 4, 2020
@droberts195
Copy link
Contributor

This is failing again in the 7.x branch even after the fix of 98c379c.

Two checks on the same PR build failed with this error:

java.lang.AssertionError: Failure at [msearch/20_typed_keys:107]: responses.0.aggregations.sampler#test_sampler.sigsterms#test_significant_terms.doc_count didn't match expected value:
responses.0.aggregations.sampler#test_sampler.sigsterms#test_significant_terms.doc_count: expected Integer [5] but was Integer [4]
  1. https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+pull-request-bwc/776/testReport/org.elasticsearch.backwards/MixedClusterClientYamlTestSuiteIT/test__p0_msearch_20_typed_keys_Multisearch_test_with_typed_keys_parameter_for_sampler_and_significant_terms_/
  2. https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+pull-request+default-distro/771/testReport/junit/org.elasticsearch.backwards/MixedClusterClientYamlTestSuiteIT/test__p0_msearch_20_typed_keys_Multisearch_test_with_typed_keys_parameter_for_sampler_and_significant_terms_/

@droberts195 droberts195 reopened this Jun 5, 2020
@nik9000
Copy link
Member

nik9000 commented Jun 5, 2020

Booo! I see my mistake. Sorry for the noise. I'll push a fix once I'm well and truly sure I'm not doing it wrong.

nik9000 added a commit that referenced this issue Jun 5, 2020
Tracked in #57402
@nik9000
Copy link
Member

nik9000 commented Jun 5, 2020

Booo! I see my mistake. Sorry for the noise. I'll push a fix once I'm well and truly sure I'm not doing it wrong.

Or, no, I don't see my problem. But I'll figure it out.

@nik9000
Copy link
Member

nik9000 commented Jun 5, 2020

Looks like this happens in master too, but it is less likely to show up:
https://build-stats.elastic.co/app/kibana#/doc/b646ed00-7efc-11e8-bf69-63c8ef516157/build-*/t?id=20200602054604-EAA5CFE2&_g=()

nik9000 added a commit to nik9000/elasticsearch that referenced this issue Jun 5, 2020
When you run a `significant_terms` aggregation on a field and it *is*
mapped but there aren't any values for it then the count of the
documents that match the query on that shard still have to be added to
the overall doc count. I broke that in elastic#57361. This fixes that.

Closes elastic#57402
nik9000 added a commit that referenced this issue Jun 8, 2020
When you run a `significant_terms` aggregation on a field and it *is*
mapped but there aren't any values for it then the count of the
documents that match the query on that shard still have to be added to
the overall doc count. I broke that in #57361. This fixes that.

Closes #57402
nik9000 added a commit to nik9000/elasticsearch that referenced this issue Jun 8, 2020
When you run a `significant_terms` aggregation on a field and it *is*
mapped but there aren't any values for it then the count of the
documents that match the query on that shard still have to be added to
the overall doc count. I broke that in elastic#57361. This fixes that.

Closes elastic#57402
nik9000 added a commit that referenced this issue Jun 8, 2020
When you run a `significant_terms` aggregation on a field and it *is*
mapped but there aren't any values for it then the count of the
documents that match the query on that shard still have to be added to
the overall doc count. I broke that in #57361. This fixes that.

Closes #57402
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-failure Triaged test failures from CI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants