Deprecate include_relocations setting (#47443)
Setting `cluster.routing.allocation.disk.include_relocations` to `false` is a bad idea since it will lead to the kinds of overshoot that were otherwise fixed in #46079. This commit deprecates this setting so it can be removed in the next major release.
This commit is contained in:
parent
5e0e54f455
commit
bb5f750ab4
|
@ -69,6 +69,7 @@ PUT /twitter/_settings
|
||||||
|
|
||||||
`cluster.routing.allocation.disk.include_relocations`::
|
`cluster.routing.allocation.disk.include_relocations`::
|
||||||
|
|
||||||
|
deprecated[7.5, Future versions will always account for relocations.]
|
||||||
Defaults to +true+, which means that Elasticsearch will take into account
|
Defaults to +true+, which means that Elasticsearch will take into account
|
||||||
shards that are currently being relocated to the target node when computing
|
shards that are currently being relocated to the target node when computing
|
||||||
a node's disk usage. Taking relocating shards' sizes into account may,
|
a node's disk usage. Taking relocating shards' sizes into account may,
|
||||||
|
|
|
@ -57,7 +57,7 @@ public class DiskThresholdSettings {
|
||||||
Setting.Property.Dynamic, Setting.Property.NodeScope);
|
Setting.Property.Dynamic, Setting.Property.NodeScope);
|
||||||
public static final Setting<Boolean> CLUSTER_ROUTING_ALLOCATION_INCLUDE_RELOCATIONS_SETTING =
|
public static final Setting<Boolean> CLUSTER_ROUTING_ALLOCATION_INCLUDE_RELOCATIONS_SETTING =
|
||||||
Setting.boolSetting("cluster.routing.allocation.disk.include_relocations", true,
|
Setting.boolSetting("cluster.routing.allocation.disk.include_relocations", true,
|
||||||
Setting.Property.Dynamic, Setting.Property.NodeScope);
|
Setting.Property.Dynamic, Setting.Property.NodeScope, Setting.Property.Deprecated);
|
||||||
public static final Setting<TimeValue> CLUSTER_ROUTING_ALLOCATION_REROUTE_INTERVAL_SETTING =
|
public static final Setting<TimeValue> CLUSTER_ROUTING_ALLOCATION_REROUTE_INTERVAL_SETTING =
|
||||||
Setting.positiveTimeSetting("cluster.routing.allocation.disk.reroute_interval", TimeValue.timeValueSeconds(60),
|
Setting.positiveTimeSetting("cluster.routing.allocation.disk.reroute_interval", TimeValue.timeValueSeconds(60),
|
||||||
Setting.Property.Dynamic, Setting.Property.NodeScope);
|
Setting.Property.Dynamic, Setting.Property.NodeScope);
|
||||||
|
|
|
@ -73,6 +73,9 @@ public class DiskThresholdSettingsTests extends ESTestCase {
|
||||||
assertEquals(30L, diskThresholdSettings.getRerouteInterval().seconds());
|
assertEquals(30L, diskThresholdSettings.getRerouteInterval().seconds());
|
||||||
assertFalse(diskThresholdSettings.isEnabled());
|
assertFalse(diskThresholdSettings.isEnabled());
|
||||||
assertFalse(diskThresholdSettings.includeRelocations());
|
assertFalse(diskThresholdSettings.includeRelocations());
|
||||||
|
|
||||||
|
assertWarnings("[cluster.routing.allocation.disk.include_relocations] setting was deprecated in Elasticsearch and " +
|
||||||
|
"will be removed in a future release! See the breaking changes documentation for the next major version.");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testInvalidConstruction() {
|
public void testInvalidConstruction() {
|
||||||
|
|
|
@ -635,7 +635,6 @@ public class DiskThresholdDeciderTests extends ESAllocationTestCase {
|
||||||
public void testShardRelocationsTakenIntoAccount() {
|
public void testShardRelocationsTakenIntoAccount() {
|
||||||
Settings diskSettings = Settings.builder()
|
Settings diskSettings = Settings.builder()
|
||||||
.put(DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_DISK_THRESHOLD_ENABLED_SETTING.getKey(), true)
|
.put(DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_DISK_THRESHOLD_ENABLED_SETTING.getKey(), true)
|
||||||
.put(DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_INCLUDE_RELOCATIONS_SETTING.getKey(), true)
|
|
||||||
.put(DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_LOW_DISK_WATERMARK_SETTING.getKey(), 0.7)
|
.put(DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_LOW_DISK_WATERMARK_SETTING.getKey(), 0.7)
|
||||||
.put(DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_HIGH_DISK_WATERMARK_SETTING.getKey(), 0.8).build();
|
.put(DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_HIGH_DISK_WATERMARK_SETTING.getKey(), 0.8).build();
|
||||||
|
|
||||||
|
@ -732,7 +731,6 @@ public class DiskThresholdDeciderTests extends ESAllocationTestCase {
|
||||||
public void testCanRemainWithShardRelocatingAway() {
|
public void testCanRemainWithShardRelocatingAway() {
|
||||||
Settings diskSettings = Settings.builder()
|
Settings diskSettings = Settings.builder()
|
||||||
.put(DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_DISK_THRESHOLD_ENABLED_SETTING.getKey(), true)
|
.put(DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_DISK_THRESHOLD_ENABLED_SETTING.getKey(), true)
|
||||||
.put(DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_INCLUDE_RELOCATIONS_SETTING.getKey(), true)
|
|
||||||
.put(DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_LOW_DISK_WATERMARK_SETTING.getKey(), "60%")
|
.put(DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_LOW_DISK_WATERMARK_SETTING.getKey(), "60%")
|
||||||
.put(DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_HIGH_DISK_WATERMARK_SETTING.getKey(), "70%").build();
|
.put(DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_HIGH_DISK_WATERMARK_SETTING.getKey(), "70%").build();
|
||||||
|
|
||||||
|
@ -862,7 +860,6 @@ public class DiskThresholdDeciderTests extends ESAllocationTestCase {
|
||||||
public void testForSingleDataNode() {
|
public void testForSingleDataNode() {
|
||||||
Settings diskSettings = Settings.builder()
|
Settings diskSettings = Settings.builder()
|
||||||
.put(DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_DISK_THRESHOLD_ENABLED_SETTING.getKey(), true)
|
.put(DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_DISK_THRESHOLD_ENABLED_SETTING.getKey(), true)
|
||||||
.put(DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_INCLUDE_RELOCATIONS_SETTING.getKey(), true)
|
|
||||||
.put(DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_LOW_DISK_WATERMARK_SETTING.getKey(), "60%")
|
.put(DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_LOW_DISK_WATERMARK_SETTING.getKey(), "60%")
|
||||||
.put(DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_HIGH_DISK_WATERMARK_SETTING.getKey(), "70%").build();
|
.put(DiskThresholdSettings.CLUSTER_ROUTING_ALLOCATION_HIGH_DISK_WATERMARK_SETTING.getKey(), "70%").build();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue