Skip to content

Commit

Permalink
Wait a bit before .async-search index shard is available (#115905) (#…
Browse files Browse the repository at this point in the history
…116001)

Co-authored-by: Elastic Machine <[email protected]>
(cherry picked from commit 36ed99c)
  • Loading branch information
astefan authored Oct 31, 2024
1 parent 5aa1756 commit 3217956
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 0 additions & 3 deletions muted-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,6 @@ tests:
- class: org.elasticsearch.backwards.MixedClusterClientYamlTestSuiteIT
method: test {p0=search/500_date_range/from, to, include_lower, include_upper deprecated}
issue: https://github.com/elastic/elasticsearch/pull/113286
- class: org.elasticsearch.xpack.esql.EsqlAsyncSecurityIT
method: testLimitedPrivilege
issue: https://github.com/elastic/elasticsearch/issues/113419
- class: org.elasticsearch.index.mapper.extras.TokenCountFieldMapperTests
method: testBlockLoaderFromRowStrideReaderWithSyntheticSource
issue: https://github.com/elastic/elasticsearch/issues/113427
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,14 @@ private Response runAsyncGet(String user, String id, boolean isAsyncIdNotFound_E
} catch (InterruptedException ex) {
throw new RuntimeException(ex);
}
} else if (statusCode == 503 && message.contains("No shard available for [get [.async-search]")) {
// Workaround for https://github.com/elastic/elasticsearch/issues/113419
logger.warn(".async-search index shards not yet available", e);
try {
Thread.sleep(500);
} catch (InterruptedException ex) {
throw new RuntimeException(ex);
}
} else {
throw e;
}
Expand Down

0 comments on commit 3217956

Please sign in to comment.