Skip to content

Lucene's optimistic knn query breaks Elasticsearch tests #131610

@thecoop

Description

@thecoop

apache/lucene#14962 has broken all our vector tests, as ES is hitting the assertion at https://github.com/apache/lucene/blob/7ac27d106487068b63c0673d4484bdefac30c293/lucene/core/src/java/org/apache/lucene/search/AbstractKnnVectorQuery.java#L402:

[ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [test-cluster-0] fatal error in thread [elasticsearch[test-cluster-0][search][T#1]], exiting java.lang.AssertionError
	at [email protected]/org.apache.lucene.search.AbstractKnnVectorQuery$ReentrantKnnCollectorManager.newCollector(AbstractKnnVectorQuery.java:402)
	at [email protected]/org.apache.lucene.search.TimeLimitingKnnCollectorManager.newCollector(TimeLimitingKnnCollectorManager.java:44)
	at [email protected]/org.apache.lucene.search.join.DiversifyingChildrenFloatKnnVectorQuery.approximateSearch(DiversifyingChildrenFloatKnnVectorQuery.java:173)
	at [email protected]/org.apache.lucene.search.AbstractKnnVectorQuery.getLeafResults(AbstractKnnVectorQuery.java:192)
	at [email protected]/org.apache.lucene.search.AbstractKnnVectorQuery.searchLeaf(AbstractKnnVectorQuery.java:174)
	at [email protected]/org.apache.lucene.search.AbstractKnnVectorQuery.lambda$rewrite$1(AbstractKnnVectorQuery.java:137)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:328)
	at [email protected]/org.apache.lucene.search.TaskExecutor$Task.run(TaskExecutor.java:173)
	at [email protected]/org.apache.lucene.search.TaskExecutor.invokeAll(TaskExecutor.java:111)
	at [email protected]/org.apache.lucene.search.AbstractKnnVectorQuery.runSearchTasks(AbstractKnnVectorQuery.java:160)
	at [email protected]/org.apache.lucene.search.AbstractKnnVectorQuery.rewrite(AbstractKnnVectorQuery.java:146)
	at [email protected]/org.apache.lucene.search.KnnFloatVectorQuery.rewrite(KnnFloatVectorQuery.java:49)
	at [email protected]/org.apache.lucene.search.IndexSearcher.rewrite(IndexSearcher.java:874)
	at [email protected]/org.elasticsearch.search.internal.ContextIndexSearcher.rewrite(ContextIndexSearcher.java:205)
	at [email protected]/org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:327)
	at [email protected]/org.elasticsearch.search.dfs.DfsPhase.singleKnnSearch(DfsPhase.java:216)
	at [email protected]/org.elasticsearch.search.dfs.DfsPhase.executeKnnVectorQuery(DfsPhase.java:202)
	at [email protected]/org.elasticsearch.search.dfs.DfsPhase.execute(DfsPhase.java:61)
	at [email protected]/org.elasticsearch.search.SearchService.executeDfsPhase(SearchService.java:666)
	at [email protected]/org.elasticsearch.search.SearchService.lambda$executeDfsPhase$5(SearchService.java:651)
	at [email protected]/org.elasticsearch.action.ActionRunnable$3.accept(ActionRunnable.java:79)
	at [email protected]/org.elasticsearch.action.ActionRunnable$3.accept(ActionRunnable.java:76)
	at [email protected]/org.elasticsearch.action.ActionRunnable$4.doRun(ActionRunnable.java:101)
	at [email protected]/org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:27)
	at [email protected]/org.elasticsearch.common.util.concurrent.TimedRunnable.doRun(TimedRunnable.java:35)
	at [email protected]/org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:1067)
	at [email protected]/org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:27)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1095)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:619)
	at java.base/java.lang.Thread.run(Thread.java:1447)
	Suppressed: java.lang.AssertionError
		at [email protected]/org.apache.lucene.search.AbstractKnnVectorQuery$ReentrantKnnCollectorManager.newCollector(AbstractKnnVectorQuery.java:402)
		at [email protected]/org.apache.lucene.search.TimeLimitingKnnCollectorManager.newCollector(TimeLimitingKnnCollectorManager.java:44)
		at [email protected]/org.apache.lucene.search.join.DiversifyingChildrenFloatKnnVectorQuery.approximateSearch(DiversifyingChildrenFloatKnnVectorQuery.java:173)
		at [email protected]/org.apache.lucene.search.AbstractKnnVectorQuery.getLeafResults(AbstractKnnVectorQuery.java:192)
		at [email protected]/org.apache.lucene.search.AbstractKnnVectorQuery.searchLeaf(AbstractKnnVectorQuery.java:174)
		at [email protected]/org.apache.lucene.search.AbstractKnnVectorQuery.lambda$rewrite$1(AbstractKnnVectorQuery.java:137)
		at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:328)
		at [email protected]/org.apache.lucene.search.TaskExecutor$Task.run(TaskExecutor.java:173)
		at [email protected]/org.apache.lucene.search.TaskExecutor.lambda$invokeAll$1(TaskExecutor.java:98)
		... 6 more

Metadata

Metadata

Assignees

Labels

:Search Relevance/VectorsVector search>bugTeam:Search RelevanceMeta label for the Search Relevance team in Elasticsearchlucene_10_3_devTracking issue that arise during the development of Lucene 10.3

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions