From a92594cbdf2ab709591aa3e673fa8667b73ef741 Mon Sep 17 00:00:00 2001 From: gmarouli Date: Thu, 30 Oct 2025 11:57:28 +0200 Subject: [PATCH 1/3] Add extra logging --- muted-tests.yml | 3 --- .../src/main/java/org/elasticsearch/test/TestCluster.java | 8 ++++++++ .../xpack/downsample/ILMDownsampleDisruptionIT.java | 5 +++++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/muted-tests.yml b/muted-tests.yml index 5308b09777c7c..5a3b4fb47e91b 100644 --- a/muted-tests.yml +++ b/muted-tests.yml @@ -456,9 +456,6 @@ tests: - class: org.elasticsearch.test.rest.yaml.RcsCcsCommonYamlTestSuiteIT method: test {p0=search.vectors/200_dense_vector_docvalue_fields/Enable docvalue_fields parameter for dense_vector fields} issue: https://github.com/elastic/elasticsearch/issues/136443 -- class: org.elasticsearch.xpack.downsample.ILMDownsampleDisruptionIT - method: testILMDownsampleRollingRestart - issue: https://github.com/elastic/elasticsearch/issues/136585 - class: org.elasticsearch.xpack.esql.heap_attack.HeapAttackIT method: testManyConcat issue: https://github.com/elastic/elasticsearch/issues/136728 diff --git a/test/framework/src/main/java/org/elasticsearch/test/TestCluster.java b/test/framework/src/main/java/org/elasticsearch/test/TestCluster.java index bc00996e03b2c..d6448e5394410 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/TestCluster.java +++ b/test/framework/src/main/java/org/elasticsearch/test/TestCluster.java @@ -234,6 +234,7 @@ public void wipeIndices(String... indices) { private void wipeIndicesAsync(String[] indices, ActionListener listener) { assert indices != null && indices.length > 0; + logger.info("---- wiping indices [{}]", Strings.arrayToCommaDelimitedString(indices)); SubscribableListener.newForked( l -> client().admin() .indices() @@ -248,6 +249,7 @@ private void wipeIndicesAsync(String[] indices, ActionListener listener) { private void handleWipeIndicesFailure(Exception exception, boolean wipingAllIndices, ActionListener listener) { Throwable unwrapped = ExceptionsHelper.unwrap(exception, IndexNotFoundException.class, IllegalArgumentException.class); + logger.error("---- initial wiping of indices failed", unwrapped); if (unwrapped instanceof IndexNotFoundException) { // ignore listener.onResponse(AcknowledgedResponse.TRUE); @@ -255,6 +257,7 @@ private void handleWipeIndicesFailure(Exception exception, boolean wipingAllIndi // Happens if `action.destructive_requires_name` is set to true // which is the case in the CloseIndexDisableCloseAllTests if (wipingAllIndices) { + logger.info("---- retry wiping indices using their concrete names", unwrapped); SubscribableListener .newForked(l -> client().admin().cluster().prepareState(TEST_REQUEST_TIMEOUT).execute(l)) @@ -274,6 +277,11 @@ private void handleWipeIndicesFailure(Exception exception, boolean wipingAllIndi // TODO: this is clearly wrong but at least // org.elasticsearch.xpack.watcher.test.integration.BootStrapTests.testTriggeredWatchLoading depends on this // quietly passing when it tries to delete an alias instead of its backing indices + logger.warn( + "This failure is ok, if this test is BootStrapTests.testTriggeredWatchLoading." + + " Otherwise, please investigate this failure:", + unwrapped + ); listener.onResponse(AcknowledgedResponse.TRUE); } diff --git a/x-pack/plugin/downsample/src/internalClusterTest/java/org/elasticsearch/xpack/downsample/ILMDownsampleDisruptionIT.java b/x-pack/plugin/downsample/src/internalClusterTest/java/org/elasticsearch/xpack/downsample/ILMDownsampleDisruptionIT.java index ae3d679ecd06e..366f97750227c 100644 --- a/x-pack/plugin/downsample/src/internalClusterTest/java/org/elasticsearch/xpack/downsample/ILMDownsampleDisruptionIT.java +++ b/x-pack/plugin/downsample/src/internalClusterTest/java/org/elasticsearch/xpack/downsample/ILMDownsampleDisruptionIT.java @@ -25,6 +25,7 @@ import org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramInterval; import org.elasticsearch.test.ESIntegTestCase; import org.elasticsearch.test.InternalTestCluster; +import org.elasticsearch.test.junit.annotations.TestLogging; import org.elasticsearch.xcontent.XContentBuilder; import org.elasticsearch.xcontent.XContentFactory; import org.elasticsearch.xpack.aggregatemetric.AggregateMetricMapperPlugin; @@ -129,6 +130,10 @@ public void setup(final String sourceIndex, int numOfShards, int numOfReplicas, assertAcked(client().execute(ILMActions.PUT, putLifecycleRequest).actionGet()); } + @TestLogging( + value = "logger.org.elasticsearch.cluster.service.MasterService:TRACE", + reason = "https://github.com/elastic/elasticsearch/issues/136585" + ) public void testILMDownsampleRollingRestart() throws Exception { final InternalTestCluster cluster = internalCluster(); cluster.startMasterOnlyNodes(1); From 135ffd82eb4dfe60f0883a6c44a914377af04dcd Mon Sep 17 00:00:00 2001 From: Mary Gouseti Date: Thu, 30 Oct 2025 14:28:23 +0200 Subject: [PATCH 2/3] Apply suggestions from code review Co-authored-by: David Turner --- .../src/main/java/org/elasticsearch/test/TestCluster.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/framework/src/main/java/org/elasticsearch/test/TestCluster.java b/test/framework/src/main/java/org/elasticsearch/test/TestCluster.java index d6448e5394410..4f4d933162733 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/TestCluster.java +++ b/test/framework/src/main/java/org/elasticsearch/test/TestCluster.java @@ -249,7 +249,7 @@ private void wipeIndicesAsync(String[] indices, ActionListener listener) { private void handleWipeIndicesFailure(Exception exception, boolean wipingAllIndices, ActionListener listener) { Throwable unwrapped = ExceptionsHelper.unwrap(exception, IndexNotFoundException.class, IllegalArgumentException.class); - logger.error("---- initial wiping of indices failed", unwrapped); + logger.error("---- initial wiping of indices failed", exception); if (unwrapped instanceof IndexNotFoundException) { // ignore listener.onResponse(AcknowledgedResponse.TRUE); @@ -257,7 +257,7 @@ private void handleWipeIndicesFailure(Exception exception, boolean wipingAllIndi // Happens if `action.destructive_requires_name` is set to true // which is the case in the CloseIndexDisableCloseAllTests if (wipingAllIndices) { - logger.info("---- retry wiping indices using their concrete names", unwrapped); + logger.info("---- retry wiping indices using their concrete names", exception); SubscribableListener .newForked(l -> client().admin().cluster().prepareState(TEST_REQUEST_TIMEOUT).execute(l)) @@ -280,7 +280,7 @@ private void handleWipeIndicesFailure(Exception exception, boolean wipingAllIndi logger.warn( "This failure is ok, if this test is BootStrapTests.testTriggeredWatchLoading." + " Otherwise, please investigate this failure:", - unwrapped + exception ); listener.onResponse(AcknowledgedResponse.TRUE); From c32d7f75b6ca743575ca3f58f61fa4dcc0298375 Mon Sep 17 00:00:00 2001 From: gmarouli Date: Thu, 30 Oct 2025 14:34:34 +0200 Subject: [PATCH 3/3] Nits --- .../xpack/downsample/ILMDownsampleDisruptionIT.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/x-pack/plugin/downsample/src/internalClusterTest/java/org/elasticsearch/xpack/downsample/ILMDownsampleDisruptionIT.java b/x-pack/plugin/downsample/src/internalClusterTest/java/org/elasticsearch/xpack/downsample/ILMDownsampleDisruptionIT.java index 366f97750227c..c31d537379f35 100644 --- a/x-pack/plugin/downsample/src/internalClusterTest/java/org/elasticsearch/xpack/downsample/ILMDownsampleDisruptionIT.java +++ b/x-pack/plugin/downsample/src/internalClusterTest/java/org/elasticsearch/xpack/downsample/ILMDownsampleDisruptionIT.java @@ -25,7 +25,7 @@ import org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramInterval; import org.elasticsearch.test.ESIntegTestCase; import org.elasticsearch.test.InternalTestCluster; -import org.elasticsearch.test.junit.annotations.TestLogging; +import org.elasticsearch.test.junit.annotations.TestIssueLogging; import org.elasticsearch.xcontent.XContentBuilder; import org.elasticsearch.xcontent.XContentFactory; import org.elasticsearch.xpack.aggregatemetric.AggregateMetricMapperPlugin; @@ -130,9 +130,9 @@ public void setup(final String sourceIndex, int numOfShards, int numOfReplicas, assertAcked(client().execute(ILMActions.PUT, putLifecycleRequest).actionGet()); } - @TestLogging( - value = "logger.org.elasticsearch.cluster.service.MasterService:TRACE", - reason = "https://github.com/elastic/elasticsearch/issues/136585" + @TestIssueLogging( + value = "org.elasticsearch.cluster.service.MasterService:TRACE", + issueUrl = "https://github.com/elastic/elasticsearch/issues/136585" ) public void testILMDownsampleRollingRestart() throws Exception { final InternalTestCluster cluster = internalCluster();