The skip_unavailable remote cluster setting is intended to allow ES admins to specify whether a cross-cluster search should fail or return partial data in the face of a remote cluster being unavailable during a cross-cluster search.
If skip_unavailable is true, a cross-cluster search:
Skips the remote cluster if its nodes are unavailable during the search. The response’s _clusters.skipped value contains a count of any skipped clusters and the _clusters.details section of the response will show a skipped status.
Ignores errors returned by the remote cluster, such as errors related to unavailable shards or indices.
ESQL cross-cluster searches should also respect this setting.
Proposed Implementation
This should be implemented in both the field-caps and policy-resolve APIs, which occur as part of the "pre-analysis" phase of ESQL processing.
Checks will be added that when a field-caps or enrich policy resolve call to a remote cluster that cluster cannot be connected to:
if skip_unavailable=true (the default setting) for the remote cluster, the cluster will be marked as SKIPPED in the EsqlExcecutionInfo metadata object for that search and reported as skipped in the _clusters/details metadata section of the ES|QL response.
if skip_unavailable=false, then a 500 http status code is returned, like _search does. However, note that _search will still return partial data in this case, whereas ES|QL will not - it will just return a top level error code. This is consistent with the fact that ES|QL currently never returns partial data.
Description
Overview
The
skip_unavailable
remote cluster setting is intended to allow ES admins to specify whether a cross-cluster search should fail or return partial data in the face of a remote cluster being unavailable during a cross-cluster search.If
skip_unavailable
is true, a cross-cluster search:ESQL cross-cluster searches should also respect this setting.
Proposed Implementation
This should be implemented in both the field-caps and policy-resolve APIs, which occur as part of the "pre-analysis" phase of ESQL processing.
Checks will be added that when a field-caps or enrich policy resolve call to a remote cluster that cluster cannot be connected to:
skip_unavailable=true
(the default setting) for the remote cluster, the cluster will be marked as SKIPPED in the EsqlExcecutionInfo metadata object for that search and reported as skipped in the_clusters/details
metadata section of the ES|QL response.skip_unavailable=false
, then a 500 http status code is returned, like _search does. However, note that _search will still return partial data in this case, whereas ES|QL will not - it will just return a top level error code. This is consistent with the fact that ES|QL currently never returns partial data.