diff --git a/test/external-modules/error-query/src/javaRestTest/java/org/elasticsearch/test/esql/EsqlPartialResultsIT.java b/test/external-modules/error-query/src/javaRestTest/java/org/elasticsearch/test/esql/EsqlPartialResultsIT.java index 5c3a8b2c50e15..5f85dc8f3bec1 100644 --- a/test/external-modules/error-query/src/javaRestTest/java/org/elasticsearch/test/esql/EsqlPartialResultsIT.java +++ b/test/external-modules/error-query/src/javaRestTest/java/org/elasticsearch/test/esql/EsqlPartialResultsIT.java @@ -214,10 +214,6 @@ public void testFailureFromRemote() throws Exception { } public void testAllShardsFailed() throws Exception { - assumeTrue( - "fail functionality is not enabled", - clusterHasCapability("POST", "/_query", List.of(), List.of("fail_if_all_shards_fail")).orElse(false) - ); setupRemoteClusters(); populateIndices(); try { @@ -236,26 +232,6 @@ public void testAllShardsFailed() throws Exception { } } - public void testAllShardsFailedOldBehavior() throws Exception { - // TODO: drop this once we no longer support the old behavior - assumeFalse( - "fail functionality is enabled", - clusterHasCapability("POST", "/_query", List.of(), List.of("fail_if_all_shards_fail")).orElse(false) - ); - setupRemoteClusters(); - populateIndices(); - try { - Request request = new Request("POST", "/_query"); - request.setJsonEntity("{\"query\": \"FROM " + "*:failing*" + " | LIMIT 100\"}"); - request.addParameter("allow_partial_results", "true"); - Response resp = client().performRequest(request); - Map results = entityAsMap(resp); - assertThat(results.get("is_partial"), equalTo(true)); - } finally { - removeRemoteCluster(); - } - } - private void setupRemoteClusters() throws IOException { String settings = String.format(Locale.ROOT, """ { diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlCapabilities.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlCapabilities.java index 5c97879dd6a6d..733f0cabb2e22 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlCapabilities.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlCapabilities.java @@ -1276,11 +1276,6 @@ public enum Cap { */ NO_BRACKETS_IN_UNQUOTED_INDEX_NAMES, - /** - * Fail if all shards fail - */ - FAIL_IF_ALL_SHARDS_FAIL(Build.current().isSnapshot()), - /** * Cosine vector similarity function */ diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plugin/ComputeService.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plugin/ComputeService.java index d0b6bdfc5668a..d12799ab8b170 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plugin/ComputeService.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plugin/ComputeService.java @@ -46,7 +46,6 @@ import org.elasticsearch.transport.RemoteClusterAware; import org.elasticsearch.transport.TransportException; import org.elasticsearch.transport.TransportService; -import org.elasticsearch.xpack.esql.action.EsqlCapabilities; import org.elasticsearch.xpack.esql.action.EsqlExecutionInfo; import org.elasticsearch.xpack.esql.action.EsqlQueryAction; import org.elasticsearch.xpack.esql.core.expression.Attribute; @@ -548,9 +547,6 @@ private static void updateExecutionInfoAfterCoordinatorOnlyQuery(EsqlExecutionIn * which doesn't consider the failures from the remote clusters when skip_unavailable is true. */ static void failIfAllShardsFailed(EsqlExecutionInfo execInfo, List finalResults) { - if (EsqlCapabilities.Cap.FAIL_IF_ALL_SHARDS_FAIL.isEnabled() == false) { - return; - } // do not fail if any final result has results if (finalResults.stream().anyMatch(p -> p.getPositionCount() > 0)) { return;