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

[CI] FieldSortBuilderTests testIsBottomSortShardDisjoint failing #74142

Closed
not-napoleon opened this issue Jun 15, 2021 · 2 comments
Closed

[CI] FieldSortBuilderTests testIsBottomSortShardDisjoint failing #74142

not-napoleon opened this issue Jun 15, 2021 · 2 comments
Assignees
Labels
:Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team >test-failure Triaged test failures from CI

Comments

@not-napoleon
Copy link
Member

Possibly related to #63719

Build scan:
https://gradle-enterprise.elastic.co/s/a54wztwjli25o/tests/:server:test/org.elasticsearch.search.sort.FieldSortBuilderTests/testIsBottomSortShardDisjoint

Reproduction line:
./gradlew ':server:test' --tests "org.elasticsearch.search.sort.FieldSortBuilderTests.testIsBottomSortShardDisjoint" -Dtests.seed=1AA90793A8BC164 -Dtests.locale=nb -Dtests.timezone=Canada/Saskatchewan -Druntime.java=11 -Dtests.fips.enabled=true

Applicable branches:
7.x

Reproduces locally?:
Yes

Failure history:
https://gradle-enterprise.elastic.co/scans/tests?tests.container=org.elasticsearch.search.sort.FieldSortBuilderTests&tests.test=testIsBottomSortShardDisjoint

Failure excerpt:

java.lang.AssertionError: (No message provided)

  at __randomizedtesting.SeedInfo.seed([1AA90793A8BC164:4B29A95ED7DCE455]:0)
  at org.junit.Assert.fail(Assert.java:86)
  at org.junit.Assert.assertTrue(Assert.java:41)
  at org.junit.Assert.assertTrue(Assert.java:52)
  at org.elasticsearch.search.sort.FieldSortBuilderTests.testIsBottomSortShardDisjoint(FieldSortBuilderTests.java:656)
  at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:-2)
  at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:566)
  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 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:834)

@not-napoleon not-napoleon added :Search/Search Search-related issues that do not fall into other categories >test-failure Triaged test failures from CI labels Jun 15, 2021
@elasticmachine elasticmachine added the Team:Search Meta label for search team label Jun 15, 2021
@elasticmachine
Copy link
Collaborator

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

@cbuescher cbuescher self-assigned this Jun 16, 2021
@cbuescher
Copy link
Member

This is failing in an interesting way that might indicate some problem in DateFieldType#fieldType.isFieldWithinQuery.
The test adds some documents with a random long min/max values on a date field to an IndexWriter and then checks some behaviour of "fieldSort.isBottomSortShardDisjoint". This starts failing when e.g. - like in the case above - for example the min value drops below 10000. In this case, deeper down in the date parsing happening under the hood, this value is mis-interpreted as a year (due to the date fields default format "strict_date_optional_time||epoch_millis"), leading to a much larger value.
I think this cannot happen on master anymore because of this fix that skips the parsing when DateFieldType#fieldType.isFieldWithinQuery already sees Long values, but we didn't backport this because it might be considered breaking.
Seeing this test failure now, I think we should think about whether this is something we can simply fix in the test setup or if we need to check isBottomSortShardDisjoint to check the implications.

cbuescher pushed a commit to cbuescher/elasticsearch that referenced this issue Jun 21, 2021
Under rare randomization conditions, the mininum values used in
FieldSortBuilderTests#testIsBottomSortShardDisjoint can currently be
missintepreted and parsed as years by the date parser that is called deeper down
in DateFieldMapper#isFieldWithinQuery. In practice this cannot happen because
`isBottomSortShardDisjoint` uses the formatted sort values for a date field,
which are string values and don't cause this kind of error. This PR fixes that
in the test setup.

Closes elastic#74142
cbuescher pushed a commit that referenced this issue Jun 21, 2021
Under rare randomization conditions, the mininum values used in
FieldSortBuilderTests#testIsBottomSortShardDisjoint can currently be
missintepreted and parsed as years by the date parser that is called deeper down
in DateFieldMapper#isFieldWithinQuery. In practice this cannot happen because
`isBottomSortShardDisjoint` uses the formatted sort values for a date field,
which are string values and don't cause this kind of error. This PR fixes that
in the test setup.

Closes #74142
cbuescher pushed a commit to cbuescher/elasticsearch that referenced this issue Jun 21, 2021
Under rare randomization conditions, the mininum values used in
FieldSortBuilderTests#testIsBottomSortShardDisjoint can currently be
missintepreted and parsed as years by the date parser that is called deeper down
in DateFieldMapper#isFieldWithinQuery. In practice this cannot happen because
`isBottomSortShardDisjoint` uses the formatted sort values for a date field,
which are string values and don't cause this kind of error. This PR fixes that
in the test setup.

Closes elastic#74142
cbuescher pushed a commit to cbuescher/elasticsearch that referenced this issue Jun 21, 2021
Under rare randomization conditions, the mininum values used in
FieldSortBuilderTests#testIsBottomSortShardDisjoint can currently be
missintepreted and parsed as years by the date parser that is called deeper down
in DateFieldMapper#isFieldWithinQuery. In practice this cannot happen because
`isBottomSortShardDisjoint` uses the formatted sort values for a date field,
which are string values and don't cause this kind of error. This PR fixes that
in the test setup.

Closes elastic#74142
cbuescher pushed a commit that referenced this issue Jun 21, 2021
Under rare randomization conditions, the mininum values used in
FieldSortBuilderTests#testIsBottomSortShardDisjoint can currently be
missintepreted and parsed as years by the date parser that is called deeper down
in DateFieldMapper#isFieldWithinQuery. In practice this cannot happen because
`isBottomSortShardDisjoint` uses the formatted sort values for a date field,
which are string values and don't cause this kind of error. This PR fixes that
in the test setup.

Closes #74142
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 Team:Search Meta label for search team >test-failure Triaged test failures from CI
Projects
None yet
Development

No branches or pull requests

3 participants