Skip to content

Commit 3217956

Browse files
Wait a bit before .async-search index shard is available (#115905) (#116001)
Co-authored-by: Elastic Machine <[email protected]> (cherry picked from commit 36ed99c)
1 parent 5aa1756 commit 3217956

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

muted-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,6 @@ tests:
210210
- class: org.elasticsearch.backwards.MixedClusterClientYamlTestSuiteIT
211211
method: test {p0=search/500_date_range/from, to, include_lower, include_upper deprecated}
212212
issue: https://github.com/elastic/elasticsearch/pull/113286
213-
- class: org.elasticsearch.xpack.esql.EsqlAsyncSecurityIT
214-
method: testLimitedPrivilege
215-
issue: https://github.com/elastic/elasticsearch/issues/113419
216213
- class: org.elasticsearch.index.mapper.extras.TokenCountFieldMapperTests
217214
method: testBlockLoaderFromRowStrideReaderWithSyntheticSource
218215
issue: https://github.com/elastic/elasticsearch/issues/113427

x-pack/plugin/esql/qa/security/src/javaRestTest/java/org/elasticsearch/xpack/esql/EsqlAsyncSecurityIT.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,14 @@ private Response runAsyncGet(String user, String id, boolean isAsyncIdNotFound_E
154154
} catch (InterruptedException ex) {
155155
throw new RuntimeException(ex);
156156
}
157+
} else if (statusCode == 503 && message.contains("No shard available for [get [.async-search]")) {
158+
// Workaround for https://github.com/elastic/elasticsearch/issues/113419
159+
logger.warn(".async-search index shards not yet available", e);
160+
try {
161+
Thread.sleep(500);
162+
} catch (InterruptedException ex) {
163+
throw new RuntimeException(ex);
164+
}
157165
} else {
158166
throw e;
159167
}

0 commit comments

Comments
 (0)