From dc613b0f1d7524986e48eb9cbe98364a31606cca Mon Sep 17 00:00:00 2001 From: Hiroki Nishino Date: Wed, 6 Mar 2019 03:57:49 +0900 Subject: [PATCH] Add lower bound on poll_interval (#39593) A poll_interval of less than 1 second doesn't make much sense, and can cause excess load on the master node if it's set too low (e.g. single digit milliseconds). However, we still want to allow relatively short poll intervals, for testing purposes, so we put a lower limit of 1 second. --- .../xpack/core/indexlifecycle/LifecycleSettings.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/LifecycleSettings.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/LifecycleSettings.java index 9d6002f685692..3cfd8556244a9 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/LifecycleSettings.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/LifecycleSettings.java @@ -16,8 +16,8 @@ public class LifecycleSettings { public static final String LIFECYCLE_NAME = "index.lifecycle.name"; public static final String LIFECYCLE_INDEXING_COMPLETE = "index.lifecycle.indexing_complete"; - public static final Setting LIFECYCLE_POLL_INTERVAL_SETTING = Setting.positiveTimeSetting(LIFECYCLE_POLL_INTERVAL, - TimeValue.timeValueMinutes(10), Setting.Property.Dynamic, Setting.Property.NodeScope); + public static final Setting LIFECYCLE_POLL_INTERVAL_SETTING = Setting.timeSetting(LIFECYCLE_POLL_INTERVAL, + TimeValue.timeValueMinutes(10), TimeValue.timeValueSeconds(1), Setting.Property.Dynamic, Setting.Property.NodeScope); public static final Setting LIFECYCLE_NAME_SETTING = Setting.simpleString(LIFECYCLE_NAME, Setting.Property.Dynamic, Setting.Property.IndexScope); public static final Setting LIFECYCLE_INDEXING_COMPLETE_SETTING = Setting.boolSetting(LIFECYCLE_INDEXING_COMPLETE, false,