Skip to content

Commit 36ed99c

Browse files
Wait a bit before .async-search index shard is available (#115905)
Co-authored-by: Elastic Machine <[email protected]>
1 parent 6b5f6fb commit 36ed99c

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
@@ -150,9 +150,6 @@ tests:
150150
- class: org.elasticsearch.backwards.MixedClusterClientYamlTestSuiteIT
151151
method: test {p0=search/500_date_range/from, to, include_lower, include_upper deprecated}
152152
issue: https://github.com/elastic/elasticsearch/pull/113286
153-
- class: org.elasticsearch.xpack.esql.EsqlAsyncSecurityIT
154-
method: testLimitedPrivilege
155-
issue: https://github.com/elastic/elasticsearch/issues/113419
156153
- class: org.elasticsearch.xpack.esql.ccq.MultiClusterSpecIT
157154
method: test {categorize.Categorize}
158155
issue: https://github.com/elastic/elasticsearch/issues/113428

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)