-
Notifications
You must be signed in to change notification settings - Fork 25.8k
NPE in Lucene TopDocs from the SearchPhaseController #23357
Description
The test org.elasticsearch.index.reindex.ReindexFailureTests testResponseOnSearchFailure has been failing for 2 days (from Feb 23 to the day this issue was opened). This has been failing on CI but I have not been able to reproduce it locally. Example CI output from the failure:
https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+master+multijob-unix-compatibility/os=oraclelinux/646/console
The issue is that org.apache.lucene.search.TopDocs$MergeSortQueue.<init>(TopDocs.java:128) throws a NPE, presumably because shardHits is null. The stack trace shows that the calls are initialized from SearchPhaseController:L265. However, the shardTopDocs is most certainly initialized and non-null when passed into the TopDocs.merge call, so its quite puzzling as to what is happening.