-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Labels
>testIssues or PRs that are addressing/adding testsIssues or PRs that are addressing/adding tests
Description
Reproduce line: gradle :core:integTest -Dtests.seed=F4BA8811B299D761 -Dtests.class=org.elasticsearch.search.aggregations.metrics.TopHitsIT -Dtests.method="testTopHitsInNestedSimple" -Dtests.security.manager=true -Dtests.locale=sk-SK -Dtests.timezone=Pacific/Pago_Pago
Doesn't reproduce consistently.
Actual error:
2> WARNING: Uncaught exception in thread: Thread[elasticsearch[node_sd1][search][T#1],5,TGRP-TopHitsIT]
2> java.lang.AssertionError
2> at __randomizedtesting.SeedInfo.seed([F4BA8811B299D761]:0)
2> at org.apache.lucene.index.AssertingLeafReader$AssertingSortedNumericDocValues.advanceExact(AssertingLeafReader.java:730)
2> at org.apache.lucene.search.SortedNumericSelector$MinValue.advanceExact(SortedNumericSelector.java:136)
2> at org.apache.lucene.search.FieldComparator$LongComparator.getValueForDoc(FieldComparator.java:363)
2> at org.apache.lucene.search.FieldComparator$LongComparator.copy(FieldComparator.java:382)
2> at org.apache.lucene.search.TopFieldCollector$SimpleFieldCollector$1.collect(TopFieldCollector.java:141)
2> at org.elasticsearch.search.aggregations.metrics.tophits.TopHitsAggregator$1.collect(TopHitsAggregator.java:138)
2> at org.elasticsearch.search.aggregations.bucket.BestBucketsDeferringCollector.prepareSelectedBuckets(BestBucketsDeferringCollector.java:178)
2> at org.elasticsearch.search.aggregations.bucket.DeferringBucketCollector.replay(DeferringBucketCollector.java:44)
2> at org.elasticsearch.search.aggregations.bucket.DeferableBucketAggregator.runDeferredCollections(DeferableBucketAggregator.java:91)
2> at org.elasticsearch.search.aggregations.bucket.terms.GlobalOrdinalsStringTermsAggregator.buildAggregation(GlobalOrdinalsStringTermsAggregator.java:225)
2> at org.elasticsearch.search.aggregations.AggregatorFactory$MultiBucketAggregatorWrapper.buildAggregation(AggregatorFactory.java:147)
2> at org.elasticsearch.search.aggregations.bucket.BucketsAggregator.bucketAggregations(BucketsAggregator.java:113)
2> at org.elasticsearch.search.aggregations.bucket.nested.NestedAggregator.buildAggregation(NestedAggregator.java:116)
2> at org.elasticsearch.search.aggregations.AggregationPhase.execute(AggregationPhase.java:129)
2> at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:116)
2> at org.elasticsearch.search.SearchService.loadOrExecuteQueryPhase(SearchService.java:302)
2> at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:335)
2> at org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:311)
2> at org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:307)
2> at org.elasticsearch.search.SearchService$3.doRun(SearchService.java:997)
2> at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:638)
2> at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
2> at org.elasticsearch.common.util.concurrent.TimedRunnable.run(TimedRunnable.java:41)
2> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
2> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
2> at java.lang.Thread.run(Thread.java:745)
Is related to this change: #26683
If top_hits aggregation gets wrapped inside nested aggregation and execution mode is breath first then sometimes the leaf collectors don't get created properly in TopHitsAggregator. I'm thinking about how to best fix this.
Metadata
Metadata
Assignees
Labels
>testIssues or PRs that are addressing/adding testsIssues or PRs that are addressing/adding tests