From eb64a81d0593c2c3732f9a108b353ee24c9d2587 Mon Sep 17 00:00:00 2001 From: Simon Willnauer Date: Mon, 21 Dec 2015 14:39:58 +0100 Subject: [PATCH] Remove `index.merge.scheduler.notify_on_failure` and default to `true` This setting was undocumented and should not be set by any user. We should fail the shard instead. Closes #15570 --- .../index/engine/InternalEngine.java | 24 +++++++++---------- .../index/shard/MergeSchedulerConfig.java | 20 ++++------------ 2 files changed, 16 insertions(+), 28 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/index/engine/InternalEngine.java b/core/src/main/java/org/elasticsearch/index/engine/InternalEngine.java index 80d0b5b3006..7911d219684 100644 --- a/core/src/main/java/org/elasticsearch/index/engine/InternalEngine.java +++ b/core/src/main/java/org/elasticsearch/index/engine/InternalEngine.java @@ -1129,20 +1129,18 @@ public class InternalEngine extends Engine { @Override protected void handleMergeException(final Directory dir, final Throwable exc) { logger.error("failed to merge", exc); - if (config().getMergeSchedulerConfig().isNotifyOnMergeFailure()) { - engineConfig.getThreadPool().generic().execute(new AbstractRunnable() { - @Override - public void onFailure(Throwable t) { - logger.debug("merge failure action rejected", t); - } + engineConfig.getThreadPool().generic().execute(new AbstractRunnable() { + @Override + public void onFailure(Throwable t) { + logger.debug("merge failure action rejected", t); + } - @Override - protected void doRun() throws Exception { - MergePolicy.MergeException e = new MergePolicy.MergeException(exc, dir); - failEngine("merge failed", e); - } - }); - } + @Override + protected void doRun() throws Exception { + MergePolicy.MergeException e = new MergePolicy.MergeException(exc, dir); + failEngine("merge failed", e); + } + }); } } diff --git a/core/src/main/java/org/elasticsearch/index/shard/MergeSchedulerConfig.java b/core/src/main/java/org/elasticsearch/index/shard/MergeSchedulerConfig.java index c329722a135..a90bf2d7d91 100644 --- a/core/src/main/java/org/elasticsearch/index/shard/MergeSchedulerConfig.java +++ b/core/src/main/java/org/elasticsearch/index/shard/MergeSchedulerConfig.java @@ -29,19 +29,19 @@ import org.elasticsearch.index.IndexSettings; * merge operations once they are needed (according to the merge policy). Merges * run in separate threads, and when the maximum number of threads is reached, * further merges will wait until a merge thread becomes available. - * + * *

The merge scheduler supports the following dynamic settings: - * + * *