Skip to content

Commit f71608f

Browse files
Decrease merge task checker periodicity in tests (#130082) (#130118)
Decreases the periodicity (from 5s to 100ms), for some tests, with which merge tasks are checked if there's sufficient available disk space to execute or if they've been aborted since enqueued for execution. Fixes #130044
1 parent ccdb22f commit f71608f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

x-pack/plugin/autoscaling/src/internalClusterTest/java/org/elasticsearch/xpack/autoscaling/storage/AutoscalingStorageIntegTestCase.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import org.elasticsearch.cluster.routing.allocation.DiskThresholdSettings;
1515
import org.elasticsearch.common.settings.Settings;
1616
import org.elasticsearch.datastreams.DataStreamsPlugin;
17+
import org.elasticsearch.index.engine.ThreadPoolMergeExecutorService;
1718
import org.elasticsearch.plugins.Plugin;
1819
import org.elasticsearch.xpack.autoscaling.LocalStateAutoscaling;
1920
import org.elasticsearch.xpack.autoscaling.action.GetAutoscalingCapacityAction;
@@ -39,7 +40,10 @@ protected Settings nodeSettings(final int nodeOrdinal, final Settings otherSetti
3940
builder.put(DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_LOW_DISK_WATERMARK_SETTING.getKey(), LOW_WATERMARK_BYTES + "b")
4041
.put(DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_HIGH_DISK_WATERMARK_SETTING.getKey(), HIGH_WATERMARK_BYTES + "b")
4142
.put(DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_DISK_FLOOD_STAGE_WATERMARK_SETTING.getKey(), "0b")
42-
.put(DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_REROUTE_INTERVAL_SETTING.getKey(), "0ms");
43+
.put(DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_REROUTE_INTERVAL_SETTING.getKey(), "0ms")
44+
// the periodicity for the checker for the available disk space as well as the merge tasks' aborting status
45+
// the default of 5 seconds might timeout some tests
46+
.put(ThreadPoolMergeExecutorService.INDICES_MERGE_DISK_CHECK_INTERVAL_SETTING.getKey(), "100ms");
4347
return builder.build();
4448
}
4549

0 commit comments

Comments
 (0)