From ed68e8b821c16ce2af68d76302b40c1a51924f0d Mon Sep 17 00:00:00 2001 From: Vasily Nemkov Date: Thu, 25 Sep 2025 19:13:36 +0200 Subject: [PATCH] Changed lock_object_storage_task_distribution_ms value to 500 Also updated settings description, and minor fix in settings history --- src/Core/Settings.cpp | 14 ++++++++++++-- src/Core/SettingsChangesHistory.cpp | 6 +++++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/Core/Settings.cpp b/src/Core/Settings.cpp index 44141270985f..b2c69047ee6d 100644 --- a/src/Core/Settings.cpp +++ b/src/Core/Settings.cpp @@ -6888,8 +6888,18 @@ Cache the list of objects returned by list objects calls in object storage DECLARE(Bool, distributed_plan_optimize_exchanges, true, R"( Removes unnecessary exchanges in distributed query plan. Disable it for debugging. )", 0) \ - DECLARE(UInt64, lock_object_storage_task_distribution_ms, 0, R"( -In object storage distribution queries do not distibute tasks on non-prefetched nodes until prefetched node is active. + DECLARE(UInt64, lock_object_storage_task_distribution_ms, 500, R"( +In object storage distribution queries do not distribute tasks on non-prefetched nodes until prefetched node is active. +Determines how long the free executor node (one that finished processing all of it assigned tasks) should wait before "stealing" tasks from queue of currently busy executor nodes. + +Possible values: + +- 0 - steal tasks immediately after freeing up. +- >0 - wait for specified period of time before stealing tasks. + +Having this `>0` helps with cache reuse and might improve overall query time. +Because busy node might have warmed-up caches for this specific task, while free node needs to fetch lots of data from S3. +Which might take longer than just waiting for the busy node and generate extra traffic. )", EXPERIMENTAL) \ DECLARE(String, distributed_plan_force_exchange_kind, "", R"( Force specified kind of Exchange operators between distributed query stages. diff --git a/src/Core/SettingsChangesHistory.cpp b/src/Core/SettingsChangesHistory.cpp index 8dbfaff5c02f..e547fbb23e18 100644 --- a/src/Core/SettingsChangesHistory.cpp +++ b/src/Core/SettingsChangesHistory.cpp @@ -67,7 +67,11 @@ const VersionToSettingsChangesMap & getSettingsChangesHistory() /// controls new feature and it's 'true' by default, use 'false' as previous_value). /// It's used to implement `compatibility` setting (see https://github.com/ClickHouse/ClickHouse/issues/35972) /// Note: please check if the key already exists to prevent duplicate entries. - addSettingsChanges(settings_changes_history, "25.6.5.2000", + addSettingsChanges(settings_changes_history, "25.6.5.20364", + { + {"lock_object_storage_task_distribution_ms", 500, 500, "Raised the value to 500 to avoid hoping tasks between executors."}, + }); + addSettingsChanges(settings_changes_history, "25.6.5.20000", { {"allow_experimental_database_iceberg", false, true, "Turned ON by default for Antalya"}, {"allow_experimental_database_unity_catalog", false, true, "Turned ON by default for Antalya"},