From f761038dfdc26ee1f9393aa2785d27dbb52cf064 Mon Sep 17 00:00:00 2001 From: Jim Ferenczi Date: Thu, 8 Sep 2016 13:38:18 +0200 Subject: [PATCH] Fix UpdateSettingsIT#testUpdateMergeMaxThreadCount. Log the setting(s) that changed in the compound updater. --- .../elasticsearch/common/settings/Setting.java | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/common/settings/Setting.java b/core/src/main/java/org/elasticsearch/common/settings/Setting.java index c22e12b3ce8..c4899701089 100644 --- a/core/src/main/java/org/elasticsearch/common/settings/Setting.java +++ b/core/src/main/java/org/elasticsearch/common/settings/Setting.java @@ -411,6 +411,12 @@ public class Setting extends ToXContentToBytes { @Override public void apply(Tuple value, Settings current, Settings previous) { + if (aSettingUpdater.hasChanged(current, previous)) { + logger.info("updating [{}] from [{}] to [{}]", aSetting.key, aSetting.getRaw(previous), aSetting.getRaw(current)); + } + if (bSettingUpdater.hasChanged(current, previous)) { + logger.info("updating [{}] from [{}] to [{}]", bSetting.key, bSetting.getRaw(previous), bSetting.getRaw(current)); + } consumer.accept(value.v1(), value.v2()); } @@ -591,9 +597,9 @@ public class Setting extends ToXContentToBytes { * Creates a setting which specifies a memory size. This can either be * specified as an absolute bytes value or as a percentage of the heap * memory. - * + * * @param key the key for the setting - * @param defaultValue the default value for this setting + * @param defaultValue the default value for this setting * @param properties properties properties for this setting like scope, filtering... * @return the setting object */ @@ -606,9 +612,9 @@ public class Setting extends ToXContentToBytes { * Creates a setting which specifies a memory size. This can either be * specified as an absolute bytes value or as a percentage of the heap * memory. - * + * * @param key the key for the setting - * @param defaultValue a function that supplies the default value for this setting + * @param defaultValue a function that supplies the default value for this setting * @param properties properties properties for this setting like scope, filtering... * @return the setting object */ @@ -620,7 +626,7 @@ public class Setting extends ToXContentToBytes { * Creates a setting which specifies a memory size. This can either be * specified as an absolute bytes value or as a percentage of the heap * memory. - * + * * @param key the key for the setting * @param defaultPercentage the default value of this setting as a percentage of the heap memory * @param properties properties properties for this setting like scope, filtering...