From 4164b2f957e6f54920ddf6b6c8edeb63bc174dc3 Mon Sep 17 00:00:00 2001 From: Albert Zaharovits Date: Mon, 16 Jun 2025 11:42:15 +0300 Subject: [PATCH 1/8] Deprecate setting and class --- .../ElasticsearchConcurrentMergeScheduler.java | 4 ++++ .../index/engine/ThreadPoolMergeScheduler.java | 14 +++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/server/src/main/java/org/elasticsearch/index/engine/ElasticsearchConcurrentMergeScheduler.java b/server/src/main/java/org/elasticsearch/index/engine/ElasticsearchConcurrentMergeScheduler.java index 90f8e6adab73d..0603308ff52b1 100644 --- a/server/src/main/java/org/elasticsearch/index/engine/ElasticsearchConcurrentMergeScheduler.java +++ b/server/src/main/java/org/elasticsearch/index/engine/ElasticsearchConcurrentMergeScheduler.java @@ -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; diff --git a/server/src/main/java/org/elasticsearch/index/engine/ThreadPoolMergeScheduler.java b/server/src/main/java/org/elasticsearch/index/engine/ThreadPoolMergeScheduler.java index 898fe078ef40c..532bd1ac48633 100644 --- a/server/src/main/java/org/elasticsearch/index/engine/ThreadPoolMergeScheduler.java +++ b/server/src/main/java/org/elasticsearch/index/engine/ThreadPoolMergeScheduler.java @@ -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 deprecated 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 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; From 09da2890c55156f5ef8c468d60923c4792127331 Mon Sep 17 00:00:00 2001 From: Albert Zaharovits Date: Mon, 16 Jun 2025 12:08:48 +0300 Subject: [PATCH 2/8] Update docs/changelog/129464.yaml --- docs/changelog/129464.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 docs/changelog/129464.yaml diff --git a/docs/changelog/129464.yaml b/docs/changelog/129464.yaml new file mode 100644 index 0000000000000..06a509f8ddd84 --- /dev/null +++ b/docs/changelog/129464.yaml @@ -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 From 8ddd4a98e253befc87813d7b73c69febc55a96b3 Mon Sep 17 00:00:00 2001 From: Albert Zaharovits Date: Tue, 17 Jun 2025 07:46:22 +0300 Subject: [PATCH 3/8] Update changelog --- docs/changelog/129464.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/changelog/129464.yaml b/docs/changelog/129464.yaml index 06a509f8ddd84..7ee73b421214c 100644 --- a/docs/changelog/129464.yaml +++ b/docs/changelog/129464.yaml @@ -5,7 +5,7 @@ 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 + area: Ingest + details: This deprecates the `indices.merge.scheduler.use_thread_pool` node setting that was introduced in #120869. + This setting should not normally be used, unless instructed so by engineering to get around temporary issues with the new threadpool-based merge scheduler. + impact: There should be no impact to users since the setting was not released before its deprecation here (and is not documented). From 76a46c33eee6050dc5e55891c96268ce39b13490 Mon Sep 17 00:00:00 2001 From: Albert Zaharovits Date: Tue, 17 Jun 2025 07:57:27 +0300 Subject: [PATCH 4/8] Meh --- docs/changelog/129464.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/changelog/129464.yaml b/docs/changelog/129464.yaml index 7ee73b421214c..c4724242454d5 100644 --- a/docs/changelog/129464.yaml +++ b/docs/changelog/129464.yaml @@ -6,6 +6,5 @@ issues: [] deprecation: title: Deprecate `indices.merge.scheduler.use_thread_pool` setting area: Ingest - details: This deprecates the `indices.merge.scheduler.use_thread_pool` node setting that was introduced in #120869. - This setting should not normally be used, unless instructed so by engineering to get around temporary issues with the new threadpool-based merge scheduler. + details: This deprecates the `indices.merge.scheduler.use_thread_pool` node setting that was introduced in #120869. This setting should not normally be used, unless instructed so by engineering to get around temporary issues with the new threadpool-based merge scheduler. impact: There should be no impact to users since the setting was not released before its deprecation here (and is not documented). From 12e0e55bdc2c097fdfd835510c409aad908f1cab Mon Sep 17 00:00:00 2001 From: Albert Zaharovits Date: Wed, 18 Jun 2025 09:51:17 +0300 Subject: [PATCH 5/8] assert deprecation warnings in tests --- ...ReplicationAllPermitsAcquisitionTests.java | 4 +++ ...oolMergeExecutorServiceDiskSpaceTests.java | 34 ++++++++++++++++++- .../ThreadPoolMergeExecutorServiceTests.java | 24 +++++++++++++ .../IndexLevelReplicationTests.java | 4 +++ .../index/shard/RefreshListenersTests.java | 4 +++ .../CcrRestoreSourceServiceTests.java | 9 +++++ 6 files changed, 78 insertions(+), 1 deletion(-) diff --git a/server/src/test/java/org/elasticsearch/action/support/replication/TransportReplicationAllPermitsAcquisitionTests.java b/server/src/test/java/org/elasticsearch/action/support/replication/TransportReplicationAllPermitsAcquisitionTests.java index 7e0d7063c417e..b6b3fa4e9f901 100644 --- a/server/src/test/java/org/elasticsearch/action/support/replication/TransportReplicationAllPermitsAcquisitionTests.java +++ b/server/src/test/java/org/elasticsearch/action/support/replication/TransportReplicationAllPermitsAcquisitionTests.java @@ -391,6 +391,10 @@ void runWithPrimaryShardReference(final TransportReplicationAction.PrimaryShardR } } } + assertWarnings( + "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the breaking changes documentation for the next major version." + ); } private void assertSuccessfulOperation(final TestAction action, final Response response) { diff --git a/server/src/test/java/org/elasticsearch/index/engine/ThreadPoolMergeExecutorServiceDiskSpaceTests.java b/server/src/test/java/org/elasticsearch/index/engine/ThreadPoolMergeExecutorServiceDiskSpaceTests.java index 97943101758fe..e6fe832b36137 100644 --- a/server/src/test/java/org/elasticsearch/index/engine/ThreadPoolMergeExecutorServiceDiskSpaceTests.java +++ b/server/src/test/java/org/elasticsearch/index/engine/ThreadPoolMergeExecutorServiceDiskSpaceTests.java @@ -67,6 +67,7 @@ public class ThreadPoolMergeExecutorServiceDiskSpaceTests extends ESTestCase { private static Settings settings; private static TestCapturingThreadPool testThreadPool; private static NodeEnvironment nodeEnvironment; + private static boolean setThreadPoolMergeSchedulerSetting; @BeforeClass public static void installMockUsableSpaceFS() throws Exception { @@ -86,7 +87,8 @@ public static void installMockUsableSpaceFS() throws Exception { // the default of "5s" slows down testing .put(ThreadPoolMergeExecutorService.INDICES_MERGE_DISK_CHECK_INTERVAL_SETTING.getKey(), "50ms") .put(EsExecutors.NODE_PROCESSORS_SETTING.getKey(), mergeExecutorThreadCount); - if (randomBoolean()) { + setThreadPoolMergeSchedulerSetting = randomBoolean(); + if (setThreadPoolMergeSchedulerSetting) { settingsBuilder.put(ThreadPoolMergeScheduler.USE_THREAD_POOL_MERGE_SCHEDULER_SETTING.getKey(), true); } settings = settingsBuilder.build(); @@ -520,6 +522,12 @@ public void testAvailableDiskSpaceMonitorSettingsUpdate() throws Exception { } }, 5, TimeUnit.SECONDS); } + if (setThreadPoolMergeSchedulerSetting) { + assertWarnings( + "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the breaking changes documentation for the next major version." + ); + } } public void testAbortingOrRunningMergeTaskHoldsUpBudget() throws Exception { @@ -593,6 +601,12 @@ public void testAbortingOrRunningMergeTaskHoldsUpBudget() throws Exception { assertThat(threadPoolMergeExecutorService.allDone(), is(true)); }); } + if (setThreadPoolMergeSchedulerSetting) { + assertWarnings( + "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the breaking changes documentation for the next major version." + ); + } } public void testBackloggedMergeTasksDoNotHoldUpBudget() throws Exception { @@ -731,6 +745,12 @@ && randomBoolean()) { assertThat(threadPoolMergeExecutorService.allDone(), is(true)); }); } + if (setThreadPoolMergeSchedulerSetting) { + assertWarnings( + "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the breaking changes documentation for the next major version." + ); + } } public void testUnavailableBudgetBlocksNewMergeTasksFromStartingExecution() throws Exception { @@ -868,6 +888,12 @@ public void testUnavailableBudgetBlocksNewMergeTasksFromStartingExecution() thro assertThat(threadPoolMergeExecutorService.allDone(), is(true)); }); } + if (setThreadPoolMergeSchedulerSetting) { + assertWarnings( + "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the breaking changes documentation for the next major version." + ); + } } public void testMergeTasksAreUnblockedWhenMoreDiskSpaceBecomesAvailable() throws Exception { @@ -1019,5 +1045,11 @@ public void testMergeTasksAreUnblockedWhenMoreDiskSpaceBecomesAvailable() throws ); }); } + if (setThreadPoolMergeSchedulerSetting) { + assertWarnings( + "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the breaking changes documentation for the next major version." + ); + } } } diff --git a/server/src/test/java/org/elasticsearch/index/engine/ThreadPoolMergeExecutorServiceTests.java b/server/src/test/java/org/elasticsearch/index/engine/ThreadPoolMergeExecutorServiceTests.java index 7a3df11e6c7a5..56db2c7ca31b6 100644 --- a/server/src/test/java/org/elasticsearch/index/engine/ThreadPoolMergeExecutorServiceTests.java +++ b/server/src/test/java/org/elasticsearch/index/engine/ThreadPoolMergeExecutorServiceTests.java @@ -211,6 +211,10 @@ public void testEnqueuedAndBackloggedMergesAreStillExecutedWhenThreadPoolIsShutd }); assertThat(countingListener.aborted.get() + countingListener.completed.get(), equalTo(doneMergesCount.get())); assertThat(countingListener.aborted.get(), equalTo(abortedMergesCount.get())); + assertWarnings( + "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the breaking changes documentation for the next major version." + ); } public void testTargetIORateChangesWhenSubmittingMergeTasks() throws Exception { @@ -298,6 +302,10 @@ public void testTargetIORateChangesWhenSubmittingMergeTasks() throws Exception { } assertBusy(() -> assertTrue(threadPoolMergeExecutorService.allDone())); } + assertWarnings( + "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the breaking changes documentation for the next major version." + ); } public void testIORateIsAdjustedForAllRunningMergeTasks() throws Exception { @@ -386,6 +394,10 @@ public void testIORateIsAdjustedForAllRunningMergeTasks() throws Exception { } assertBusy(() -> assertTrue(threadPoolMergeExecutorService.allDone())); } + assertWarnings( + "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the breaking changes documentation for the next major version." + ); } public void testIORateAdjustedForSubmittedTasksWhenExecutionRateIsSpeedy() throws IOException { @@ -567,6 +579,10 @@ public void testMergeTasksRunConcurrently() throws Exception { } assertBusy(() -> assertTrue(threadPoolMergeExecutorService.allDone())); } + assertWarnings( + "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the breaking changes documentation for the next major version." + ); } public void testThreadPoolStatsWithBackloggedMergeTasks() throws Exception { @@ -626,6 +642,10 @@ public void testThreadPoolStatsWithBackloggedMergeTasks() throws Exception { assertTrue(threadPoolMergeExecutorService.allDone()); }); } + assertWarnings( + "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the breaking changes documentation for the next major version." + ); } public void testBackloggedMergeTasksExecuteExactlyOnce() throws Exception { @@ -697,6 +717,10 @@ public void testBackloggedMergeTasksExecuteExactlyOnce() throws Exception { assertTrue(threadPoolMergeExecutorService.allDone()); }); } + assertWarnings( + "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the breaking changes documentation for the next major version." + ); } public void testMergeTasksExecuteInSizeOrder() throws IOException { diff --git a/server/src/test/java/org/elasticsearch/index/replication/IndexLevelReplicationTests.java b/server/src/test/java/org/elasticsearch/index/replication/IndexLevelReplicationTests.java index 0357d02dbbb98..2945419d57640 100644 --- a/server/src/test/java/org/elasticsearch/index/replication/IndexLevelReplicationTests.java +++ b/server/src/test/java/org/elasticsearch/index/replication/IndexLevelReplicationTests.java @@ -666,6 +666,10 @@ public void testLateDeliveryAfterGCTriggeredOnReplica() throws Exception { indexOnReplica(indexRequest, shards, replica); // index arrives on replica lately. shards.assertAllEqual(0); } + assertWarnings( + "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the breaking changes documentation for the next major version." + ); } private void updateGCDeleteCycle(IndexShard shard, TimeValue interval) { diff --git a/server/src/test/java/org/elasticsearch/index/shard/RefreshListenersTests.java b/server/src/test/java/org/elasticsearch/index/shard/RefreshListenersTests.java index e21b046d7a9f8..63bb6d368b8f5 100644 --- a/server/src/test/java/org/elasticsearch/index/shard/RefreshListenersTests.java +++ b/server/src/test/java/org/elasticsearch/index/shard/RefreshListenersTests.java @@ -186,6 +186,10 @@ public void onFailedEngine(String reason, @Nullable Exception e) { @After public void tearDownListeners() throws Exception { + assertWarnings( + "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the breaking changes documentation for the next major version." + ); IOUtils.close(engine, store, nodeEnvironment, () -> terminate(threadPool)); } diff --git a/x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/ccr/repository/CcrRestoreSourceServiceTests.java b/x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/ccr/repository/CcrRestoreSourceServiceTests.java index f577ccd4e5a44..7a9801ee0610c 100644 --- a/x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/ccr/repository/CcrRestoreSourceServiceTests.java +++ b/x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/ccr/repository/CcrRestoreSourceServiceTests.java @@ -24,6 +24,7 @@ import org.elasticsearch.index.store.Store; import org.elasticsearch.index.store.StoreFileMetadata; import org.elasticsearch.xpack.ccr.CcrSettings; +import org.junit.After; import org.junit.Before; import java.io.IOException; @@ -49,6 +50,14 @@ public void setUp() throws Exception { restoreSourceService = new CcrRestoreSourceService(taskQueue.getThreadPool(), new CcrSettings(Settings.EMPTY, clusterSettings)); } + @After + public void assertWarnings() { + assertWarnings( + "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the breaking changes documentation for the next major version." + ); + } + public void testOpenSession() throws IOException { IndexShard indexShard1 = newStartedShard(true); IndexShard indexShard2 = newStartedShard(true); From c7043b3ad286c9794f2dfa3cc4ec0adbbc0d44b5 Mon Sep 17 00:00:00 2001 From: elasticsearchmachine Date: Wed, 18 Jun 2025 07:02:18 +0000 Subject: [PATCH 6/8] [CI] Auto commit changes from spotless --- ...ReplicationAllPermitsAcquisitionTests.java | 4 ++-- ...oolMergeExecutorServiceDiskSpaceTests.java | 20 +++++++++---------- .../ThreadPoolMergeExecutorServiceTests.java | 20 +++++++++---------- .../IndexLevelReplicationTests.java | 4 ++-- .../index/shard/RefreshListenersTests.java | 4 ++-- .../CcrRestoreSourceServiceTests.java | 4 ++-- 6 files changed, 28 insertions(+), 28 deletions(-) diff --git a/server/src/test/java/org/elasticsearch/action/support/replication/TransportReplicationAllPermitsAcquisitionTests.java b/server/src/test/java/org/elasticsearch/action/support/replication/TransportReplicationAllPermitsAcquisitionTests.java index b6b3fa4e9f901..ca524bfd77357 100644 --- a/server/src/test/java/org/elasticsearch/action/support/replication/TransportReplicationAllPermitsAcquisitionTests.java +++ b/server/src/test/java/org/elasticsearch/action/support/replication/TransportReplicationAllPermitsAcquisitionTests.java @@ -392,8 +392,8 @@ void runWithPrimaryShardReference(final TransportReplicationAction.PrimaryShardR } } assertWarnings( - "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the breaking changes documentation for the next major version." + "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the breaking changes documentation for the next major version." ); } diff --git a/server/src/test/java/org/elasticsearch/index/engine/ThreadPoolMergeExecutorServiceDiskSpaceTests.java b/server/src/test/java/org/elasticsearch/index/engine/ThreadPoolMergeExecutorServiceDiskSpaceTests.java index e6fe832b36137..914121d819160 100644 --- a/server/src/test/java/org/elasticsearch/index/engine/ThreadPoolMergeExecutorServiceDiskSpaceTests.java +++ b/server/src/test/java/org/elasticsearch/index/engine/ThreadPoolMergeExecutorServiceDiskSpaceTests.java @@ -524,8 +524,8 @@ public void testAvailableDiskSpaceMonitorSettingsUpdate() throws Exception { } if (setThreadPoolMergeSchedulerSetting) { assertWarnings( - "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the breaking changes documentation for the next major version." + "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the breaking changes documentation for the next major version." ); } } @@ -603,8 +603,8 @@ public void testAbortingOrRunningMergeTaskHoldsUpBudget() throws Exception { } if (setThreadPoolMergeSchedulerSetting) { assertWarnings( - "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the breaking changes documentation for the next major version." + "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the breaking changes documentation for the next major version." ); } } @@ -747,8 +747,8 @@ && randomBoolean()) { } if (setThreadPoolMergeSchedulerSetting) { assertWarnings( - "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the breaking changes documentation for the next major version." + "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the breaking changes documentation for the next major version." ); } } @@ -890,8 +890,8 @@ public void testUnavailableBudgetBlocksNewMergeTasksFromStartingExecution() thro } if (setThreadPoolMergeSchedulerSetting) { assertWarnings( - "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the breaking changes documentation for the next major version." + "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the breaking changes documentation for the next major version." ); } } @@ -1047,8 +1047,8 @@ public void testMergeTasksAreUnblockedWhenMoreDiskSpaceBecomesAvailable() throws } if (setThreadPoolMergeSchedulerSetting) { assertWarnings( - "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the breaking changes documentation for the next major version." + "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the breaking changes documentation for the next major version." ); } } diff --git a/server/src/test/java/org/elasticsearch/index/engine/ThreadPoolMergeExecutorServiceTests.java b/server/src/test/java/org/elasticsearch/index/engine/ThreadPoolMergeExecutorServiceTests.java index 56db2c7ca31b6..cec52af12cade 100644 --- a/server/src/test/java/org/elasticsearch/index/engine/ThreadPoolMergeExecutorServiceTests.java +++ b/server/src/test/java/org/elasticsearch/index/engine/ThreadPoolMergeExecutorServiceTests.java @@ -303,8 +303,8 @@ public void testTargetIORateChangesWhenSubmittingMergeTasks() throws Exception { assertBusy(() -> assertTrue(threadPoolMergeExecutorService.allDone())); } assertWarnings( - "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the breaking changes documentation for the next major version." + "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the breaking changes documentation for the next major version." ); } @@ -395,8 +395,8 @@ public void testIORateIsAdjustedForAllRunningMergeTasks() throws Exception { assertBusy(() -> assertTrue(threadPoolMergeExecutorService.allDone())); } assertWarnings( - "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the breaking changes documentation for the next major version." + "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the breaking changes documentation for the next major version." ); } @@ -580,8 +580,8 @@ public void testMergeTasksRunConcurrently() throws Exception { assertBusy(() -> assertTrue(threadPoolMergeExecutorService.allDone())); } assertWarnings( - "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the breaking changes documentation for the next major version." + "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the breaking changes documentation for the next major version." ); } @@ -643,8 +643,8 @@ public void testThreadPoolStatsWithBackloggedMergeTasks() throws Exception { }); } assertWarnings( - "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the breaking changes documentation for the next major version." + "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the breaking changes documentation for the next major version." ); } @@ -718,8 +718,8 @@ public void testBackloggedMergeTasksExecuteExactlyOnce() throws Exception { }); } assertWarnings( - "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the breaking changes documentation for the next major version." + "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the breaking changes documentation for the next major version." ); } diff --git a/server/src/test/java/org/elasticsearch/index/replication/IndexLevelReplicationTests.java b/server/src/test/java/org/elasticsearch/index/replication/IndexLevelReplicationTests.java index 2945419d57640..6c5e698419615 100644 --- a/server/src/test/java/org/elasticsearch/index/replication/IndexLevelReplicationTests.java +++ b/server/src/test/java/org/elasticsearch/index/replication/IndexLevelReplicationTests.java @@ -667,8 +667,8 @@ public void testLateDeliveryAfterGCTriggeredOnReplica() throws Exception { shards.assertAllEqual(0); } assertWarnings( - "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the breaking changes documentation for the next major version." + "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the breaking changes documentation for the next major version." ); } diff --git a/server/src/test/java/org/elasticsearch/index/shard/RefreshListenersTests.java b/server/src/test/java/org/elasticsearch/index/shard/RefreshListenersTests.java index 63bb6d368b8f5..d031ef187b70b 100644 --- a/server/src/test/java/org/elasticsearch/index/shard/RefreshListenersTests.java +++ b/server/src/test/java/org/elasticsearch/index/shard/RefreshListenersTests.java @@ -187,8 +187,8 @@ public void onFailedEngine(String reason, @Nullable Exception e) { @After public void tearDownListeners() throws Exception { assertWarnings( - "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the breaking changes documentation for the next major version." + "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the breaking changes documentation for the next major version." ); IOUtils.close(engine, store, nodeEnvironment, () -> terminate(threadPool)); } diff --git a/x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/ccr/repository/CcrRestoreSourceServiceTests.java b/x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/ccr/repository/CcrRestoreSourceServiceTests.java index 7a9801ee0610c..aa3c8f663d795 100644 --- a/x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/ccr/repository/CcrRestoreSourceServiceTests.java +++ b/x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/ccr/repository/CcrRestoreSourceServiceTests.java @@ -53,8 +53,8 @@ public void setUp() throws Exception { @After public void assertWarnings() { assertWarnings( - "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the breaking changes documentation for the next major version." + "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch and will be removed in a future release. " + + "See the breaking changes documentation for the next major version." ); } From 4989727b9dcf0529d4b0fde00caa01845737b42a Mon Sep 17 00:00:00 2001 From: Albert Zaharovits Date: Wed, 18 Jun 2025 10:38:35 +0300 Subject: [PATCH 7/8] checkstyle --- ...oolMergeExecutorServiceDiskSpaceTests.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/server/src/test/java/org/elasticsearch/index/engine/ThreadPoolMergeExecutorServiceDiskSpaceTests.java b/server/src/test/java/org/elasticsearch/index/engine/ThreadPoolMergeExecutorServiceDiskSpaceTests.java index 914121d819160..a8fe089fbec7f 100644 --- a/server/src/test/java/org/elasticsearch/index/engine/ThreadPoolMergeExecutorServiceDiskSpaceTests.java +++ b/server/src/test/java/org/elasticsearch/index/engine/ThreadPoolMergeExecutorServiceDiskSpaceTests.java @@ -524,8 +524,8 @@ public void testAvailableDiskSpaceMonitorSettingsUpdate() throws Exception { } if (setThreadPoolMergeSchedulerSetting) { assertWarnings( - "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the breaking changes documentation for the next major version." + "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch " + + "and will be removed in a future release. See the breaking changes documentation for the next major version." ); } } @@ -603,8 +603,8 @@ public void testAbortingOrRunningMergeTaskHoldsUpBudget() throws Exception { } if (setThreadPoolMergeSchedulerSetting) { assertWarnings( - "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the breaking changes documentation for the next major version." + "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch " + + "and will be removed in a future release. See the breaking changes documentation for the next major version." ); } } @@ -747,8 +747,8 @@ && randomBoolean()) { } if (setThreadPoolMergeSchedulerSetting) { assertWarnings( - "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the breaking changes documentation for the next major version." + "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch " + + "and will be removed in a future release. See the breaking changes documentation for the next major version." ); } } @@ -890,8 +890,8 @@ public void testUnavailableBudgetBlocksNewMergeTasksFromStartingExecution() thro } if (setThreadPoolMergeSchedulerSetting) { assertWarnings( - "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the breaking changes documentation for the next major version." + "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch " + + "and will be removed in a future release. See the breaking changes documentation for the next major version." ); } } @@ -1047,8 +1047,8 @@ public void testMergeTasksAreUnblockedWhenMoreDiskSpaceBecomesAvailable() throws } if (setThreadPoolMergeSchedulerSetting) { assertWarnings( - "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch and will be removed in a future release. " - + "See the breaking changes documentation for the next major version." + "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch " + + "and will be removed in a future release. See the breaking changes documentation for the next major version." ); } } From f7610bf32a7ece7b7fa7d796d10596a7b975cde9 Mon Sep 17 00:00:00 2001 From: elasticsearchmachine Date: Wed, 18 Jun 2025 07:50:57 +0000 Subject: [PATCH 8/8] [CI] Auto commit changes from spotless --- ...ThreadPoolMergeExecutorServiceDiskSpaceTests.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/server/src/test/java/org/elasticsearch/index/engine/ThreadPoolMergeExecutorServiceDiskSpaceTests.java b/server/src/test/java/org/elasticsearch/index/engine/ThreadPoolMergeExecutorServiceDiskSpaceTests.java index a8fe089fbec7f..d5df3b9e95607 100644 --- a/server/src/test/java/org/elasticsearch/index/engine/ThreadPoolMergeExecutorServiceDiskSpaceTests.java +++ b/server/src/test/java/org/elasticsearch/index/engine/ThreadPoolMergeExecutorServiceDiskSpaceTests.java @@ -603,8 +603,8 @@ public void testAbortingOrRunningMergeTaskHoldsUpBudget() throws Exception { } if (setThreadPoolMergeSchedulerSetting) { assertWarnings( - "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch " - + "and will be removed in a future release. See the breaking changes documentation for the next major version." + "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch " + + "and will be removed in a future release. See the breaking changes documentation for the next major version." ); } } @@ -890,8 +890,8 @@ public void testUnavailableBudgetBlocksNewMergeTasksFromStartingExecution() thro } if (setThreadPoolMergeSchedulerSetting) { assertWarnings( - "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch " - + "and will be removed in a future release. See the breaking changes documentation for the next major version." + "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch " + + "and will be removed in a future release. See the breaking changes documentation for the next major version." ); } } @@ -1047,8 +1047,8 @@ public void testMergeTasksAreUnblockedWhenMoreDiskSpaceBecomesAvailable() throws } if (setThreadPoolMergeSchedulerSetting) { assertWarnings( - "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch " - + "and will be removed in a future release. See the breaking changes documentation for the next major version." + "[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch " + + "and will be removed in a future release. See the breaking changes documentation for the next major version." ); } }