Skip to content

Commit

Permalink
Fix cluster.routing.allocation.disk.include_relocations setting
Browse files Browse the repository at this point in the history
This setting was incorrectly backported and as a result, was dynamically
settable, but the new setting never actually took effect.
  • Loading branch information
dakrone committed Dec 8, 2014
1 parent f96e6c3 commit 6a36cec
Showing 1 changed file with 6 additions and 1 deletion.
Expand Up @@ -36,7 +36,6 @@
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.node.settings.NodeSettingsService;

import java.util.List;
import java.util.Map;

import static org.elasticsearch.cluster.InternalClusterInfoService.shardIdentifierFromRouting;
Expand Down Expand Up @@ -87,6 +86,7 @@ class ApplySettings implements NodeSettingsService.Listener {
public void onRefreshSettings(Settings settings) {
String newLowWatermark = settings.get(CLUSTER_ROUTING_ALLOCATION_LOW_DISK_WATERMARK, null);
String newHighWatermark = settings.get(CLUSTER_ROUTING_ALLOCATION_HIGH_DISK_WATERMARK, null);
Boolean newRelocationsSetting = settings.getAsBoolean(CLUSTER_ROUTING_ALLOCATION_INCLUDE_RELOCATIONS, null);
Boolean newEnableSetting = settings.getAsBoolean(CLUSTER_ROUTING_ALLOCATION_DISK_THRESHOLD_ENABLED, null);
TimeValue newRerouteInterval = settings.getAsTime(CLUSTER_ROUTING_ALLOCATION_REROUTE_INTERVAL, null);

Expand All @@ -95,6 +95,11 @@ public void onRefreshSettings(Settings settings) {
DiskThresholdDecider.this.enabled, newEnableSetting);
DiskThresholdDecider.this.enabled = newEnableSetting;
}
if (newRelocationsSetting != null) {
logger.info("updating [{}] from [{}] to [{}]", CLUSTER_ROUTING_ALLOCATION_INCLUDE_RELOCATIONS,
DiskThresholdDecider.this.includeRelocations, newRelocationsSetting);
DiskThresholdDecider.this.includeRelocations = newRelocationsSetting;
}
if (newLowWatermark != null) {
if (!validWatermarkSetting(newLowWatermark)) {
throw new ElasticsearchParseException("Unable to parse low watermark: [" + newLowWatermark + "]");
Expand Down

0 comments on commit 6a36cec

Please sign in to comment.