Skip to content

Commit be2f024

Browse files
authored
Revert "Put shards failure under a cap flag (#131371)" (#131542)
This reverts commit 0411940.
1 parent feafb3a commit be2f024

File tree

3 files changed

+0
-33
lines changed

3 files changed

+0
-33
lines changed

test/external-modules/error-query/src/javaRestTest/java/org/elasticsearch/test/esql/EsqlPartialResultsIT.java

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -214,10 +214,6 @@ public void testFailureFromRemote() throws Exception {
214214
}
215215

216216
public void testAllShardsFailed() throws Exception {
217-
assumeTrue(
218-
"fail functionality is not enabled",
219-
clusterHasCapability("POST", "/_query", List.of(), List.of("fail_if_all_shards_fail")).orElse(false)
220-
);
221217
setupRemoteClusters();
222218
populateIndices();
223219
try {
@@ -236,26 +232,6 @@ public void testAllShardsFailed() throws Exception {
236232
}
237233
}
238234

239-
public void testAllShardsFailedOldBehavior() throws Exception {
240-
// TODO: drop this once we no longer support the old behavior
241-
assumeFalse(
242-
"fail functionality is enabled",
243-
clusterHasCapability("POST", "/_query", List.of(), List.of("fail_if_all_shards_fail")).orElse(false)
244-
);
245-
setupRemoteClusters();
246-
populateIndices();
247-
try {
248-
Request request = new Request("POST", "/_query");
249-
request.setJsonEntity("{\"query\": \"FROM " + "*:failing*" + " | LIMIT 100\"}");
250-
request.addParameter("allow_partial_results", "true");
251-
Response resp = client().performRequest(request);
252-
Map<String, Object> results = entityAsMap(resp);
253-
assertThat(results.get("is_partial"), equalTo(true));
254-
} finally {
255-
removeRemoteCluster();
256-
}
257-
}
258-
259235
private void setupRemoteClusters() throws IOException {
260236
String settings = String.format(Locale.ROOT, """
261237
{

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlCapabilities.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1276,11 +1276,6 @@ public enum Cap {
12761276
*/
12771277
NO_BRACKETS_IN_UNQUOTED_INDEX_NAMES,
12781278

1279-
/**
1280-
* Fail if all shards fail
1281-
*/
1282-
FAIL_IF_ALL_SHARDS_FAIL(Build.current().isSnapshot()),
1283-
12841279
/**
12851280
* Cosine vector similarity function
12861281
*/

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
import org.elasticsearch.transport.RemoteClusterAware;
4747
import org.elasticsearch.transport.TransportException;
4848
import org.elasticsearch.transport.TransportService;
49-
import org.elasticsearch.xpack.esql.action.EsqlCapabilities;
5049
import org.elasticsearch.xpack.esql.action.EsqlExecutionInfo;
5150
import org.elasticsearch.xpack.esql.action.EsqlQueryAction;
5251
import org.elasticsearch.xpack.esql.core.expression.Attribute;
@@ -548,9 +547,6 @@ private static void updateExecutionInfoAfterCoordinatorOnlyQuery(EsqlExecutionIn
548547
* which doesn't consider the failures from the remote clusters when skip_unavailable is true.
549548
*/
550549
static void failIfAllShardsFailed(EsqlExecutionInfo execInfo, List<Page> finalResults) {
551-
if (EsqlCapabilities.Cap.FAIL_IF_ALL_SHARDS_FAIL.isEnabled() == false) {
552-
return;
553-
}
554550
// do not fail if any final result has results
555551
if (finalResults.stream().anyMatch(p -> p.getPositionCount() > 0)) {
556552
return;

0 commit comments

Comments
 (0)