Skip to content

Commit 7519de6

Browse files
authored
Disable rebalancing in DataStreamLifecycleDownsampleDisruptionIT (#133036)
We were seeing test failures here due by the relocation of some shards taking more than 30 seconds. This happened after downsampling had already completed, causing the `ensureGreen` at the end of the test to time out. The Distributed Coordination team suggested disabling shard rebalancing in this test (among other things, which have already been implemented). Fixes #131394
1 parent 22f4648 commit 7519de6

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

muted-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -384,9 +384,6 @@ tests:
384384
- class: org.elasticsearch.packaging.test.DockerTests
385385
method: test130JavaHasCorrectOwnership
386386
issue: https://github.com/elastic/elasticsearch/issues/131369
387-
- class: org.elasticsearch.xpack.downsample.DataStreamLifecycleDownsampleDisruptionIT
388-
method: testDataStreamLifecycleDownsampleRollingRestart
389-
issue: https://github.com/elastic/elasticsearch/issues/131394
390387
- class: org.elasticsearch.packaging.test.DockerTests
391388
method: test072RunEsAsDifferentUserAndGroup
392389
issue: https://github.com/elastic/elasticsearch/issues/131412

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import org.elasticsearch.action.downsample.DownsampleConfig;
1515
import org.elasticsearch.cluster.metadata.DataStreamLifecycle;
1616
import org.elasticsearch.cluster.metadata.IndexMetadata;
17+
import org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider;
1718
import org.elasticsearch.cluster.service.ClusterService;
1819
import org.elasticsearch.common.settings.Settings;
1920
import org.elasticsearch.core.TimeValue;
@@ -34,9 +35,12 @@ public class DataStreamLifecycleDownsampleDisruptionIT extends DownsamplingInteg
3435

3536
@Override
3637
protected Settings nodeSettings(int nodeOrdinal, Settings otherSettings) {
37-
Settings.Builder settings = Settings.builder().put(super.nodeSettings(nodeOrdinal, otherSettings));
38-
settings.put(DataStreamLifecycleService.DATA_STREAM_LIFECYCLE_POLL_INTERVAL, "1s");
39-
return settings.build();
38+
return Settings.builder()
39+
.put(super.nodeSettings(nodeOrdinal, otherSettings))
40+
.put(DataStreamLifecycleService.DATA_STREAM_LIFECYCLE_POLL_INTERVAL, "1s")
41+
// We disable shard rebalancing to avoid shard relocations timing out the `ensureGreen` call at the end of the test. See #131394
42+
.put(EnableAllocationDecider.CLUSTER_ROUTING_REBALANCE_ENABLE_SETTING.getKey(), "none")
43+
.build();
4044
}
4145

4246
public void testDataStreamLifecycleDownsampleRollingRestart() throws Exception {
@@ -85,7 +89,7 @@ public void testDataStreamLifecycleDownsampleRollingRestart() throws Exception {
8589

8690
ensureDownsamplingStatus(targetIndex, IndexMetadata.DownsampleTaskStatus.SUCCESS, TimeValue.timeValueSeconds(120));
8791
ensureGreen(targetIndex);
88-
logger.info("-> Relocation has finished");
92+
logger.info("-> Index is green and downsampling completed successfully.");
8993
}
9094

9195
private void ensureDownsamplingStatus(String downsampledIndex, IndexMetadata.DownsampleTaskStatus expectedStatus, TimeValue timeout) {

0 commit comments

Comments
 (0)