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

[BUG] org.opensearch.search.sort.FieldSortIT.testNestedSort is flaky #11258

Closed
reta opened this issue Nov 17, 2023 · 1 comment · Fixed by #11377
Closed

[BUG] org.opensearch.search.sort.FieldSortIT.testNestedSort is flaky #11258

reta opened this issue Nov 17, 2023 · 1 comment · Fixed by #11377
Assignees
Labels
bug Something isn't working flaky-test Random test failure that succeeds on second run untriaged

Comments

@reta
Copy link
Collaborator

reta commented Nov 17, 2023

Describe the bug
The test case org.opensearch.search.sort.FieldSortIT.testNestedSort {p0={"search.concurrent_segment_search.enabled":"true"}} is flaky:

org.opensearch.search.sort.FieldSortIT.testNestedSort {p0={"search.concurrent_segment_search.enabled":"true"}}

java.lang.AssertionError: Unexpected ShardFailures: [shard [[ZnnKIyq6S-27DJ1SdUqFeQ][test][0]], reason [RemoteTransportException[[node_s3][127.0.0.1:41401][indices:data/read/search[phase/query]]]; nested: QueryPhaseExecutionException[Query Failed [Failed to execute main query]]; nested: NotSerializableExceptionWrapper[no_such_element_exception: null]; ], cause [NotSerializableExceptionWrapper[no_such_element_exception: null]
	at java.util.LinkedList.removeFirst(LinkedList.java:281)
	at java.util.LinkedList.pop(LinkedList.java:812)
	at org.opensearch.index.query.support.NestedScope.previousLevel(NestedScope.java:71)
	at org.opensearch.search.sort.SortBuilder.resolveNestedQuery(SortBuilder.java:252)
	at org.opensearch.search.sort.SortBuilder.resolveNested(SortBuilder.java:202)
	at org.opensearch.search.sort.SortBuilder.resolveNested(SortBuilder.java:198)
	at org.opensearch.search.sort.FieldSortBuilder.nested(FieldSortBuilder.java:583)
	at org.opensearch.search.sort.FieldSortBuilder.build(FieldSortBuilder.java:409)
	at org.opensearch.search.sort.SortBuilder.buildSort(SortBuilder.java:168)
	at org.opensearch.search.sort.FieldSortBuilder.getMinMaxOrNullInternal(FieldSortBuilder.java:629)
	at org.opensearch.search.sort.FieldSortBuilder.getMinMaxOrNullForSegment(FieldSortBuilder.java:624)
	at org.opensearch.search.internal.ContextIndexSearcher.canMatchSearchAfter(ContextIndexSearcher.java:514)
	at org.opensearch.search.internal.ContextIndexSearcher.canMatch(ContextIndexSearcher.java:506)
	at org.opensearch.search.internal.ContextIndexSearcher.searchLeaf(ContextIndexSearcher.java:297)
	at org.opensearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:282)
	at org.apache.lucene.search.IndexSearcher.lambda$search$1(IndexSearcher.java:715)
	at java.util.concurrent.FutureTask.run(FutureTask.java:317)
	at org.opensearch.threadpool.TaskAwareRunnable.doRun(TaskAwareRunnable.java:78)
	at org.opensearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:52)
	at org.opensearch.common.util.concurrent.TimedRunnable.doRun(TimedRunnable.java:59)
	at org.opensearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:911)
	at org.opensearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:52)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.lang.Thread.run(Thread.java:1583)
]]
Expected: <0>
     but: was <1>

To Reproduce

./gradlew ':server:internalClusterTest' --tests "org.opensearch.search.sort.FieldSortIT" -Dtests.method="testNestedSort {p0={"search.concurrent_segment_search.enabled":"true"}}" -Dtests.seed=8BF6866B7AD32A83

Expected behavior
A clear and concise description of what you expected to happen.

Plugins
Standard

Screenshots
If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

  • CI

Additional context

@jed326
Copy link
Collaborator

jed326 commented Nov 27, 2023

This looks like the same race condition as #11187. Will try to open a PR for this issue this week.

@jed326 jed326 self-assigned this Nov 27, 2023
@jed326 jed326 moved this from Todo to In Progress in Concurrent Search Nov 28, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in Concurrent Search Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working flaky-test Random test failure that succeeds on second run untriaged
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants