waitForChe
return this;
}
+ /**
+ * Set the timeout for the {@link #setWaitForCheckpoints(Map)} request.
+ */
+ public SearchRequestBuilder setWaitForCheckpointsTimeout(final TimeValue waitForCheckpointsTimeout) {
+ request.setWaitForCheckpointsTimeout(waitForCheckpointsTimeout);
+ return this;
+ }
+
/**
* Specifies what type of requested indices to ignore and wildcard indices expressions.
*
diff --git a/server/src/main/resources/org/elasticsearch/TransportVersions.csv b/server/src/main/resources/org/elasticsearch/TransportVersions.csv
index b0ef5b780e775..26c518962c19a 100644
--- a/server/src/main/resources/org/elasticsearch/TransportVersions.csv
+++ b/server/src/main/resources/org/elasticsearch/TransportVersions.csv
@@ -131,3 +131,4 @@
8.15.1,8702002
8.15.2,8702003
8.15.3,8702003
+8.15.4,8702003
diff --git a/server/src/main/resources/org/elasticsearch/index/IndexVersions.csv b/server/src/main/resources/org/elasticsearch/index/IndexVersions.csv
index e3681cc975988..6cab0b513ee63 100644
--- a/server/src/main/resources/org/elasticsearch/index/IndexVersions.csv
+++ b/server/src/main/resources/org/elasticsearch/index/IndexVersions.csv
@@ -131,3 +131,4 @@
8.15.1,8512000
8.15.2,8512000
8.15.3,8512000
+8.15.4,8512000
diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/integration/MlRestTestStateCleaner.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/integration/MlRestTestStateCleaner.java
index 6f6224d505327..25d9509ecdc7a 100644
--- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/integration/MlRestTestStateCleaner.java
+++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ml/integration/MlRestTestStateCleaner.java
@@ -10,14 +10,15 @@
import org.elasticsearch.client.Request;
import org.elasticsearch.client.Response;
import org.elasticsearch.client.RestClient;
-import org.elasticsearch.common.xcontent.support.XContentMapValues;
import org.elasticsearch.test.rest.ESRestTestCase;
import java.io.IOException;
+import java.util.HashSet;
import java.util.List;
import java.util.Map;
-import java.util.Set;
-import java.util.stream.Collectors;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.hasSize;
public class MlRestTestStateCleaner {
@@ -30,24 +31,29 @@ public MlRestTestStateCleaner(Logger logger, RestClient adminClient) {
}
public void resetFeatures() throws IOException {
- waitForMlStatsIndexToInitialize();
- deleteAllTrainedModelIngestPipelines();
+ deletePipelinesWithInferenceProcessors();
// This resets all features, not just ML, but they should have been getting reset between tests anyway so it shouldn't matter
adminClient.performRequest(new Request("POST", "/_features/_reset"));
}
@SuppressWarnings("unchecked")
- private void deleteAllTrainedModelIngestPipelines() throws IOException {
- final Request getAllTrainedModelStats = new Request("GET", "/_ml/trained_models/_stats");
- getAllTrainedModelStats.addParameter("size", "10000");
- final Response trainedModelsStatsResponse = adminClient.performRequest(getAllTrainedModelStats);
+ private void deletePipelinesWithInferenceProcessors() throws IOException {
+ final Response pipelinesResponse = adminClient.performRequest(new Request("GET", "/_ingest/pipeline"));
+ final Map pipelines = ESRestTestCase.entityAsMap(pipelinesResponse);
+
+ var pipelinesWithInferenceProcessors = new HashSet();
+ for (var entry : pipelines.entrySet()) {
+ var pipelineDef = (Map) entry.getValue(); // each top level object is a separate pipeline
+ var processors = (List