-
Notifications
You must be signed in to change notification settings - Fork 24.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Breaking change for single data node setting #73737
Merged
henningandersen
merged 9 commits into
elastic:master
from
henningandersen:fix_single_data_node_watermark_only_true
Jun 7, 2021
Merged
Changes from 6 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
f368bb8
Breaking change for single data node setting
henningandersen 8e8e62b
cs
henningandersen 50a3df6
close block
henningandersen 108ae11
matcher contains is not collection contains
henningandersen 91eb0b1
Remove obsolete test for non-single data node
henningandersen 4348b92
Randomly set the setting.
henningandersen 50c489e
Update docs/reference/modules/cluster/disk_allocator.asciidoc
henningandersen c5b5adb
Remove the check, since always true.
henningandersen 12e3ca6
Breaking breaking change changes...
henningandersen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,9 +26,11 @@ | |
import org.elasticsearch.cluster.routing.allocation.RoutingAllocation; | ||
import org.elasticsearch.common.Strings; | ||
import org.elasticsearch.common.collect.ImmutableOpenMap; | ||
import org.elasticsearch.common.logging.DeprecationLogger; | ||
import org.elasticsearch.common.settings.ClusterSettings; | ||
import org.elasticsearch.common.settings.Setting; | ||
import org.elasticsearch.common.settings.Settings; | ||
import org.elasticsearch.common.settings.SettingsException; | ||
import org.elasticsearch.common.unit.ByteSizeValue; | ||
import org.elasticsearch.index.Index; | ||
import org.elasticsearch.index.shard.ShardId; | ||
|
@@ -66,11 +68,22 @@ | |
public class DiskThresholdDecider extends AllocationDecider { | ||
|
||
private static final Logger logger = LogManager.getLogger(DiskThresholdDecider.class); | ||
private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(DiskThresholdDecider.class); | ||
|
||
public static final String NAME = "disk_threshold"; | ||
|
||
public static final Setting<Boolean> ENABLE_FOR_SINGLE_DATA_NODE = | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this means the |
||
Setting.boolSetting("cluster.routing.allocation.disk.watermark.enable_for_single_data_node", false, Setting.Property.NodeScope); | ||
Setting.boolSetting("cluster.routing.allocation.disk.watermark.enable_for_single_data_node", true, | ||
new Setting.Validator<>() { | ||
@Override | ||
public void validate(Boolean value) { | ||
if (value == Boolean.FALSE) { | ||
throw new SettingsException("setting [{}=false] is not allowed, only true is valid", | ||
ENABLE_FOR_SINGLE_DATA_NODE.getKey()); | ||
} | ||
} | ||
}, | ||
Setting.Property.NodeScope, Setting.Property.Deprecated); | ||
|
||
public static final Setting<Boolean> SETTING_IGNORE_DISK_WATERMARKS = | ||
Setting.boolSetting("index.routing.allocation.disk.watermark.ignore", false, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also consider the change in allocation behaviour on a single node to be a breaking change, and indicate that folks should set
cluster.routing.allocation.disk.threshold_enabled: false
if they want to keep the old behaviour?