Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions docs/changelog/129464.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
pr: 129464
summary: Deprecate `indices.merge.scheduler.use_thread_pool` setting
area: Engine
type: deprecation
issues: []
deprecation:
title: Deprecate `indices.merge.scheduler.use_thread_pool` setting
area: Engine
details: Please describe the details of this change for the release notes. You can
use asciidoc.
impact: Please describe the impact of this change to users
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@
/**
* An extension to the {@link ConcurrentMergeScheduler} that provides tracking on merge times, total
* and current merges.
* @deprecated Replaced by {@link org.elasticsearch.index.engine.ThreadPoolMergeScheduler}. This merge scheduler
* implementation should only be used to get around unexpected issues with the {@link ThreadPoolMergeScheduler},
* which is the default one.
*/
@Deprecated
public class ElasticsearchConcurrentMergeScheduler extends ConcurrentMergeScheduler implements ElasticsearchMergeScheduler {

protected final Logger logger;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,22 @@
import java.util.concurrent.atomic.AtomicLong;

public class ThreadPoolMergeScheduler extends MergeScheduler implements ElasticsearchMergeScheduler {
/**
* This setting switches between the original {@link ElasticsearchConcurrentMergeScheduler}
* and the new {@link ThreadPoolMergeScheduler} merge scheduler implementations (the latter is switched ON by default).
* This setting is purposefully undocumented, because we expect that only the new {@link ThreadPoolMergeScheduler} implementation
* (which is enabled by default) be used from now on. Our users should not touch this setting in their deployments,
* unless consulting with engineering, because the original implementation should only be used (by setting this to {@code false})
* to get around unexpected issues with the new one.
* The setting is also <b>deprecated</b> in the hope that any unexpected issues with the new merge scheduler implementation are
* promptly resolved, such that, in the near future, there's never a need to switch to the original implementation,
* which will then be removed together with this setting.
*/
public static final Setting<Boolean> USE_THREAD_POOL_MERGE_SCHEDULER_SETTING = Setting.boolSetting(
"indices.merge.scheduler.use_thread_pool",
true,
Setting.Property.NodeScope
Setting.Property.NodeScope,
Setting.Property.Deprecated
);
private final ShardId shardId;
private final MergeSchedulerConfig config;
Expand Down
Loading