Skip to content

Commit 8fe9a20

Browse files
authored
Forbid negative values for index.unassigned.node_left.delayed_timeout (#26828)
Change delayed_timeout to be a positiveTimeSetting, and add note that this is a breaking change
1 parent 1715fd7 commit 8fe9a20

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

core/src/main/java/org/elasticsearch/cluster/routing/UnassignedInfo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public final class UnassignedInfo implements ToXContentFragment, Writeable {
5050
public static final FormatDateTimeFormatter DATE_TIME_FORMATTER = Joda.forPattern("dateOptionalTime");
5151

5252
public static final Setting<TimeValue> INDEX_DELAYED_NODE_LEFT_TIMEOUT_SETTING =
53-
Setting.timeSetting("index.unassigned.node_left.delayed_timeout", TimeValue.timeValueMinutes(1), Property.Dynamic,
53+
Setting.positiveTimeSetting("index.unassigned.node_left.delayed_timeout", TimeValue.timeValueMinutes(1), Property.Dynamic,
5454
Property.IndexScope);
5555
/**
5656
* Reason why the shard is in unassigned state.

docs/reference/migration/migrate_7_0/indices.asciidoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,8 @@
55

66
Due to cross-cluster search using `:` to separate a cluster and index name,
77
index names may no longer contain `:`.
8+
9+
==== `index.unassigned.node_left.delayed_timeout` may no longer be negative
10+
11+
Negative values were interpreted as zero in earlier versions but are no
12+
longer accepted.

0 commit comments

Comments
 (0)