Skip to content

Commit 3ebd7a3

Browse files
authored
Test investigation: [CI] ILMDownsampleDisruptionIT testILMDownsampleRollingRestart (#137363)
We are adding extra logging to investigate [[CI] ILMDownsampleDisruptionIT testILMDownsampleRollingRestart](#136585). The current logging aims to help us understand what happens when the test tier down tries to delete the downsampled index.
1 parent 4a7db66 commit 3ebd7a3

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

muted-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -456,9 +456,6 @@ tests:
456456
- class: org.elasticsearch.test.rest.yaml.RcsCcsCommonYamlTestSuiteIT
457457
method: test {p0=search.vectors/200_dense_vector_docvalue_fields/Enable docvalue_fields parameter for dense_vector fields}
458458
issue: https://github.com/elastic/elasticsearch/issues/136443
459-
- class: org.elasticsearch.xpack.downsample.ILMDownsampleDisruptionIT
460-
method: testILMDownsampleRollingRestart
461-
issue: https://github.com/elastic/elasticsearch/issues/136585
462459
- class: org.elasticsearch.xpack.esql.heap_attack.HeapAttackIT
463460
method: testManyConcat
464461
issue: https://github.com/elastic/elasticsearch/issues/136728

test/framework/src/main/java/org/elasticsearch/test/TestCluster.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ public void wipeIndices(String... indices) {
234234

235235
private void wipeIndicesAsync(String[] indices, ActionListener<Void> listener) {
236236
assert indices != null && indices.length > 0;
237+
logger.info("---- wiping indices [{}]", Strings.arrayToCommaDelimitedString(indices));
237238
SubscribableListener.<AcknowledgedResponse>newForked(
238239
l -> client().admin()
239240
.indices()
@@ -248,13 +249,15 @@ private void wipeIndicesAsync(String[] indices, ActionListener<Void> listener) {
248249

249250
private void handleWipeIndicesFailure(Exception exception, boolean wipingAllIndices, ActionListener<AcknowledgedResponse> listener) {
250251
Throwable unwrapped = ExceptionsHelper.unwrap(exception, IndexNotFoundException.class, IllegalArgumentException.class);
252+
logger.error("---- initial wiping of indices failed", exception);
251253
if (unwrapped instanceof IndexNotFoundException) {
252254
// ignore
253255
listener.onResponse(AcknowledgedResponse.TRUE);
254256
} else if (unwrapped instanceof IllegalArgumentException) {
255257
// Happens if `action.destructive_requires_name` is set to true
256258
// which is the case in the CloseIndexDisableCloseAllTests
257259
if (wipingAllIndices) {
260+
logger.info("---- retry wiping indices using their concrete names", exception);
258261
SubscribableListener
259262

260263
.<ClusterStateResponse>newForked(l -> client().admin().cluster().prepareState(TEST_REQUEST_TIMEOUT).execute(l))
@@ -274,6 +277,11 @@ private void handleWipeIndicesFailure(Exception exception, boolean wipingAllIndi
274277
// TODO: this is clearly wrong but at least
275278
// org.elasticsearch.xpack.watcher.test.integration.BootStrapTests.testTriggeredWatchLoading depends on this
276279
// quietly passing when it tries to delete an alias instead of its backing indices
280+
logger.warn(
281+
"This failure is ok, if this test is BootStrapTests.testTriggeredWatchLoading."
282+
+ " Otherwise, please investigate this failure:",
283+
exception
284+
);
277285
listener.onResponse(AcknowledgedResponse.TRUE);
278286

279287
}

x-pack/plugin/downsample/src/internalClusterTest/java/org/elasticsearch/xpack/downsample/ILMDownsampleDisruptionIT.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramInterval;
2626
import org.elasticsearch.test.ESIntegTestCase;
2727
import org.elasticsearch.test.InternalTestCluster;
28+
import org.elasticsearch.test.junit.annotations.TestIssueLogging;
2829
import org.elasticsearch.xcontent.XContentBuilder;
2930
import org.elasticsearch.xcontent.XContentFactory;
3031
import org.elasticsearch.xpack.aggregatemetric.AggregateMetricMapperPlugin;
@@ -129,6 +130,10 @@ public void setup(final String sourceIndex, int numOfShards, int numOfReplicas,
129130
assertAcked(client().execute(ILMActions.PUT, putLifecycleRequest).actionGet());
130131
}
131132

133+
@TestIssueLogging(
134+
value = "org.elasticsearch.cluster.service.MasterService:TRACE",
135+
issueUrl = "https://github.com/elastic/elasticsearch/issues/136585"
136+
)
132137
public void testILMDownsampleRollingRestart() throws Exception {
133138
final InternalTestCluster cluster = internalCluster();
134139
cluster.startMasterOnlyNodes(1);

0 commit comments

Comments
 (0)