Browse Source

Merge pull request ESQL-1551 from elastic/main

🤖 ESQL: Merge upstream
elasticsearchmachine 2 years ago
parent
commit
ba9ad32588

+ 3 - 3
build-tools/src/main/java/org/elasticsearch/gradle/testclusters/ElasticsearchNode.java

@@ -1213,12 +1213,12 @@ public class ElasticsearchNode implements TestClusterConfiguration {
         try {
             processHandle.onExit().get(ES_DESTROY_TIMEOUT, ES_DESTROY_TIMEOUT_UNIT);
         } catch (InterruptedException e) {
-            LOGGER.info("Interrupted while waiting for ES process", e);
+            LOGGER.info("[{}] Interrupted while waiting for ES process", name, e);
             Thread.currentThread().interrupt();
         } catch (ExecutionException e) {
-            LOGGER.info("Failure while waiting for process to exist", e);
+            LOGGER.info("[{}] Failure while waiting for process to exist", name, e);
         } catch (TimeoutException e) {
-            LOGGER.info("Timed out waiting for process to exit", e);
+            LOGGER.info("[{}] Timed out waiting for process to exit", name, e);
         }
     }
 

+ 3 - 0
server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestResetFeatureStateAction.java

@@ -15,12 +15,15 @@ import org.elasticsearch.client.internal.node.NodeClient;
 import org.elasticsearch.rest.BaseRestHandler;
 import org.elasticsearch.rest.RestRequest;
 import org.elasticsearch.rest.RestStatus;
+import org.elasticsearch.rest.Scope;
+import org.elasticsearch.rest.ServerlessScope;
 import org.elasticsearch.rest.action.RestToXContentListener;
 
 import java.io.IOException;
 import java.util.List;
 
 /** Rest handler for feature state reset requests */
+@ServerlessScope(Scope.INTERNAL)
 public class RestResetFeatureStateAction extends BaseRestHandler {
 
     @Override

+ 5 - 0
test/framework/src/main/java/org/elasticsearch/test/rest/ObjectPath.java

@@ -166,4 +166,9 @@ public class ObjectPath {
         }
         return builder;
     }
+
+    @Override
+    public String toString() {
+        return "ObjectPath[" + object + "]";
+    }
 }

+ 7 - 3
test/test-clusters/src/main/java/org/elasticsearch/test/cluster/util/ProcessUtils.java

@@ -117,7 +117,11 @@ public final class ProcessUtils {
                 if (processHandle.isAlive() == false) {
                     return;
                 }
-                LOGGER.info("Process did not terminate after {}, stopping it forcefully", PROCESS_DESTROY_TIMEOUT);
+                LOGGER.info(
+                    "Process did not terminate after {}, stopping it forcefully: {}",
+                    PROCESS_DESTROY_TIMEOUT,
+                    processHandle.info()
+                );
                 processHandle.destroyForcibly();
             }
 
@@ -147,9 +151,9 @@ public final class ProcessUtils {
                 return processHandle.isAlive() == false;
             });
         } catch (ExecutionException e) {
-            LOGGER.info("Failure while waiting for process to exist", e);
+            LOGGER.info("Failure while waiting for process to exit: {}", processHandle.info(), e);
         } catch (TimeoutException e) {
-            LOGGER.info("Timed out waiting for process to exit", e);
+            LOGGER.info("Timed out waiting for process to exit: {}", processHandle.info(), e);
         }
     }
 

+ 2 - 0
x-pack/plugin/async-search/src/internalClusterTest/java/org/elasticsearch/xpack/search/CrossClusterAsyncSearchIT.java

@@ -7,6 +7,7 @@
 
 package org.elasticsearch.xpack.search;
 
+import org.apache.lucene.tests.util.LuceneTestCase;
 import org.elasticsearch.ExceptionsHelper;
 import org.elasticsearch.ResourceNotFoundException;
 import org.elasticsearch.action.ActionFuture;
@@ -82,6 +83,7 @@ import static org.hamcrest.Matchers.not;
  * This IT test copies the setup and general approach that the {@code CrossClusterSearchIT} test
  * used for testing synchronous CCS.
  */
+@LuceneTestCase.AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/98272")
 public class CrossClusterAsyncSearchIT extends AbstractMultiClustersTestCase {
 
     private static final String REMOTE_CLUSTER = "cluster_a";