Skip to content

Commit 2024f2c

Browse files
committed
Fix also plan-time
1 parent 9d773a3 commit 2024f2c

File tree

1 file changed

+12
-6
lines changed
  • x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/session

1 file changed

+12
-6
lines changed

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/session/EsqlCCSUtils.java

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -221,15 +221,21 @@ static void updateExecutionInfoWithClustersWithNoMatchingIndices(
221221
"Unknown index [%s]",
222222
(c.equals(RemoteClusterAware.LOCAL_CLUSTER_GROUP_KEY) ? indexExpression : c + ":" + indexExpression)
223223
);
224-
if (fatalErrorMessage == null) {
225-
fatalErrorMessage = error;
226-
} else {
227-
fatalErrorMessage += "; " + error;
224+
if (executionInfo.isSkipUnavailable(c) == false) {
225+
if (fatalErrorMessage == null) {
226+
fatalErrorMessage = error;
227+
} else {
228+
fatalErrorMessage += "; " + error;
229+
}
228230
}
229231
if (filter == null) {
230-
// Not very useful since we don't send metadata on errors now, but may be useful in the future
231232
// We check for filter since the filter may be the reason why the index is missing, and then it's ok
232-
markClusterWithFinalStateAndNoShards(executionInfo, c, Cluster.Status.FAILED, new VerificationException(error));
233+
markClusterWithFinalStateAndNoShards(
234+
executionInfo,
235+
c,
236+
executionInfo.isSkipUnavailable(c) ? Cluster.Status.SKIPPED : Cluster.Status.FAILED,
237+
new VerificationException(error)
238+
);
233239
}
234240
} else {
235241
if (indexResolution.isValid()) {

0 commit comments

Comments
 (0)