Skip to content

Commit

Permalink
Deprecate include_relocations setting
Browse files Browse the repository at this point in the history
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 elastic#46079. This commit deprecates this setting so it can be removed in the next
major release.
  • Loading branch information
DaveCTurner committed Oct 2, 2019
1 parent fcf6c17 commit 0853924
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/reference/modules/cluster/disk_allocator.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ PUT /twitter/_settings

`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
shards that are currently being relocated to the target node when computing
a node's disk usage. Taking relocating shards' sizes into account may,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public class DiskThresholdSettings {
Setting.Property.Dynamic, Setting.Property.NodeScope);
public static final Setting<Boolean> CLUSTER_ROUTING_ALLOCATION_INCLUDE_RELOCATIONS_SETTING =
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 =
Setting.positiveTimeSetting("cluster.routing.allocation.disk.reroute_interval", TimeValue.timeValueSeconds(60),
Setting.Property.Dynamic, Setting.Property.NodeScope);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ public void testUpdate() {
assertEquals(30L, diskThresholdSettings.getRerouteInterval().seconds());
assertFalse(diskThresholdSettings.isEnabled());
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() {
Expand Down

0 comments on commit 0853924

Please sign in to comment.