Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions muted-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,6 @@ tests:
- class: org.elasticsearch.search.retriever.RankDocRetrieverBuilderIT
method: testRankDocsRetrieverWithNestedQuery
issue: https://github.com/elastic/elasticsearch/issues/112421
- class: org.elasticsearch.indices.mapping.UpdateMappingIntegrationIT
issue: https://github.com/elastic/elasticsearch/issues/112423
- class: org.elasticsearch.xpack.esql.expression.function.aggregate.SpatialCentroidTests
method: "testAggregateIntermediate {TestCase=<geo_point> #2}"
issue: https://github.com/elastic/elasticsearch/issues/112461
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1864,7 +1864,15 @@ private void postIndexAsyncActions(String[] indices, List<CountDownLatch> inFlig
}
while (inFlightAsyncOperations.size() > MAX_IN_FLIGHT_ASYNC_INDEXES) {
int waitFor = between(0, inFlightAsyncOperations.size() - 1);
safeAwait(inFlightAsyncOperations.remove(waitFor));
try {
assertTrue(
"operation did not complete within timeout",
inFlightAsyncOperations.remove(waitFor).await(60, TimeUnit.SECONDS)
);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
fail(e, "interrupted while waiting for operation to complete");
}
Comment on lines -1867 to +1875
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively, we could limit the number of operations. I think most usages are just a few indexing requests. But decided to keep the change minimal which is a middle ground between the previous code (wait indefinitely) and the current code.

}
}

Expand Down