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] DateHistogramAggregatorTests.testAsSubAgg failing #57168

Closed
mark-vieira opened this issue May 26, 2020 · 6 comments
Closed

[CI] DateHistogramAggregatorTests.testAsSubAgg failing #57168

mark-vieira opened this issue May 26, 2020 · 6 comments
Assignees
Labels
:Analytics/Aggregations Aggregations Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) >test-failure Triaged test failures from CI

Comments

@mark-vieira
Copy link
Contributor

Build scan:
Master: https://gradle-enterprise.elastic.co/s/jn4odc7uka7xe/tests/:server:test/org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramAggregatorTests/testAsSubAgg#1
7.x: https://gradle-enterprise.elastic.co/s/p6w2gne7bvoja/tests/:server:test/org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramAggregatorTests/testAsSubAgg#1

Repro line:

./gradlew ':server:test' --tests "org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramAggregatorTests.testAsSubAgg" -Dtests.seed=998A06EB372D3C31 -Dtests.security.manager=true -Dtests.locale=es-CO -Dtests.timezone=America/Indiana/Marengo -Dcompiler.java=14 -Druntime.java=11

Reproduces locally?:
Yes, reproduced on both master and 7.x branches for me.

Applicable branches:
master and 7.x

Failure history:
https://gradle-enterprise.elastic.co/scans/tests?search.buildToolType=gradle&search.buildToolType=maven&search.relativeStartTime=P7D&search.tags=not:fips&search.tags=not:nested&search.timeZoneId=America/Los_Angeles&tests.container=org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramAggregatorTests&tests.disabledDistributions=WyJvdXRjb21lOnBhc3NlZCIsIm91dGNvbWU6c2tpcHBlZCJd&tests.sortField=FAILED&tests.test=testAsSubAgg&tests.unstableOnly=true

Failure excerpt:

org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramAggregatorTests > testAsSubAgg FAILED
    java.lang.ClassCastException: class org.apache.lucene.index.ParallelCompositeReader cannot be cast to class org.apache.lucene.index.DirectoryReader (org.apache.lucene.index.ParallelCompositeReader and org.apache.lucene.index.DirectoryReader are in unnamed module of loader 'app')
        at __randomizedtesting.SeedInfo.seed([998A06EB372D3C31:EF77AC97E69658CA]:0)
        at org.elasticsearch.search.aggregations.support.ValuesSource$Bytes$WithOrdinals$FieldData.globalOrdinalsValues(ValuesSource.java:206)
        at org.elasticsearch.search.aggregations.support.ValuesSource$Bytes$WithOrdinals.globalMaxOrd(ValuesSource.java:179)
        at org.elasticsearch.search.aggregations.bucket.terms.TermsAggregatorFactory.getMaxOrd(TermsAggregatorFactory.java:300)
        at org.elasticsearch.search.aggregations.bucket.terms.TermsAggregatorFactory.access$100(TermsAggregatorFactory.java:52)
        at org.elasticsearch.search.aggregations.bucket.terms.TermsAggregatorFactory$1.build(TermsAggregatorFactory.java:108)
        at org.elasticsearch.search.aggregations.bucket.terms.TermsAggregatorFactory.doCreateInternal(TermsAggregatorFactory.java:274)
        at org.elasticsearch.search.aggregations.support.ValuesSourceAggregatorFactory.createInternal(ValuesSourceAggregatorFactory.java:49)
        at org.elasticsearch.search.aggregations.AggregatorFactory.create(AggregatorFactory.java:250)
        at org.elasticsearch.search.aggregations.AggregatorTestCase.createAggregator(AggregatorTestCase.java:244)
        at org.elasticsearch.search.aggregations.AggregatorTestCase.createAggregator(AggregatorTestCase.java:222)
        at org.elasticsearch.search.aggregations.AggregatorTestCase.searchAndReduce(AggregatorTestCase.java:493)
        at org.elasticsearch.search.aggregations.AggregatorTestCase.searchAndReduce(AggregatorTestCase.java:441)
        at org.elasticsearch.search.aggregations.AggregatorTestCase.testCase(AggregatorTestCase.java:567)
        at org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramAggregatorTests.testAsSubAgg(DateHistogramAggregatorTests.java:225)
REPRODUCE WITH: ./gradlew ':server:test' --tests "org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramAggregatorTests.testAsSubAgg" -Dtests.seed=998A06EB372D3C31 -Dtests.security.manager=true -Dtests.locale=es-CO -Dtests.timezone=America/Indiana/Marengo -Dcompiler.java=14 -Druntime.java=11
@mark-vieira mark-vieira added :Analytics/Aggregations Aggregations >test-failure Triaged test failures from CI labels May 26, 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 May 26, 2020
@mark-vieira
Copy link
Contributor Author

I've muted this test in both master and 7.x since it's reproducing.

@nik9000 nik9000 self-assigned this May 26, 2020
@nik9000
Copy link
Member

nik9000 commented May 26, 2020

I saw this this weekend while I was playing with something only vaguely related. I'll push a fix.

@polyfractal
Copy link
Contributor

These generally occur because we're calling Lucene's newSearcher() instead of our own AggregatorTestCase#newIndexSearcher(). Not sure what changed to make it start failing but that's almost certainly the cause.

I don't know enough to know if we should blacklist that method from Lucene, but it'd be nice if we could...

@nik9000
Copy link
Member

nik9000 commented May 26, 2020

huh! It looks like AggregatorTestCase#testCase was using newSearcher. I'll swap it out.

@nik9000
Copy link
Member

nik9000 commented May 26, 2020

I pushed 60f91d8 with the fix @polyfractal talked about.

nik9000 added a commit that referenced this issue May 26, 2020
Closes #57168 by using `AggregatorTestCase#newIndexSearcher` in the
`AggregatorTestCase#testCase`. Without that global ordinals will
*sometimes* fail to work.
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

No branches or pull requests

4 participants