Skip to content

NPE in Lucene TopDocs from the SearchPhaseController #23357

@abeyad

Description

@abeyad

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.

Metadata

Metadata

Assignees

Labels

:Search/SearchSearch-related issues that do not fall into other categories>bug

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions