diff --git a/src/Core/ServerSettings.cpp b/src/Core/ServerSettings.cpp index 0a94b0dffcc..2b4ee6485bc 100644 --- a/src/Core/ServerSettings.cpp +++ b/src/Core/ServerSettings.cpp @@ -19,7 +19,10 @@ void ServerSettings::loadSettingsFromConfig(const Poco::Util::AbstractConfigurat "background_buffer_flush_schedule_pool_size", "background_schedule_pool_size", "background_message_broker_schedule_pool_size", - "background_distributed_schedule_pool_size" + "background_distributed_schedule_pool_size", + + "max_remote_read_network_bandwidth_for_server", + "max_remote_write_network_bandwidth_for_server", }; for (auto setting : all()) diff --git a/src/Core/Settings.h b/src/Core/Settings.h index e88387c9c98..fe5e1a1a787 100644 --- a/src/Core/Settings.h +++ b/src/Core/Settings.h @@ -738,6 +738,7 @@ class IColumn; #define MAKE_OBSOLETE(M, TYPE, NAME, DEFAULT) \ M(TYPE, NAME, DEFAULT, "Obsolete setting, does nothing.", BaseSettingsHelpers::Flags::OBSOLETE) +/// NOTE: ServerSettings::loadSettingsFromConfig() should be updated to include this settings #define MAKE_DEPRECATED_BY_SERVER_CONFIG(M, TYPE, NAME, DEFAULT) \ M(TYPE, NAME, DEFAULT, "User-level setting is deprecated, and it must be defined in the server configuration instead.", BaseSettingsHelpers::Flags::OBSOLETE) @@ -771,6 +772,8 @@ class IColumn; MAKE_DEPRECATED_BY_SERVER_CONFIG(M, UInt64, background_schedule_pool_size, 128) \ MAKE_DEPRECATED_BY_SERVER_CONFIG(M, UInt64, background_message_broker_schedule_pool_size, 16) \ MAKE_DEPRECATED_BY_SERVER_CONFIG(M, UInt64, background_distributed_schedule_pool_size, 16) \ + MAKE_DEPRECATED_BY_SERVER_CONFIG(M, UInt64, max_remote_read_network_bandwidth_for_server, 0) \ + MAKE_DEPRECATED_BY_SERVER_CONFIG(M, UInt64, max_remote_write_network_bandwidth_for_server, 0) \ /* ---- */ \ MAKE_OBSOLETE(M, DefaultDatabaseEngine, default_database_engine, DefaultDatabaseEngine::Atomic) \ MAKE_OBSOLETE(M, UInt64, max_pipeline_depth, 0) \ @@ -780,8 +783,6 @@ class IColumn; MAKE_OBSOLETE(M, Seconds, drain_timeout, 3) \ MAKE_OBSOLETE(M, UInt64, backup_threads, 16) \ MAKE_OBSOLETE(M, UInt64, restore_threads, 16) \ - MAKE_OBSOLETE(M, UInt64, max_remote_read_network_bandwidth_for_server, 0) \ - MAKE_OBSOLETE(M, UInt64, max_remote_write_network_bandwidth_for_server, 0) \ /** The section above is for obsolete settings. Do not add anything there. */ diff --git a/src/Interpreters/Context.cpp b/src/Interpreters/Context.cpp index dfe7342ce02..d3d15671ae3 100644 --- a/src/Interpreters/Context.cpp +++ b/src/Interpreters/Context.cpp @@ -2333,9 +2333,7 @@ ThrottlerPtr Context::getRemoteReadThrottler() const ThrottlerPtr throttler; const auto & query_settings = getSettingsRef(); - UInt64 bandwidth_for_server = query_settings.max_remote_read_network_bandwidth_for_server; - if (shared->server_settings.max_remote_read_network_bandwidth_for_server.changed) - bandwidth_for_server = shared->server_settings.max_remote_read_network_bandwidth_for_server.changed; + UInt64 bandwidth_for_server = shared->server_settings.max_remote_read_network_bandwidth_for_server; if (bandwidth_for_server) { auto lock = getLock(); @@ -2360,9 +2358,7 @@ ThrottlerPtr Context::getRemoteWriteThrottler() const ThrottlerPtr throttler; const auto & query_settings = getSettingsRef(); - UInt64 bandwidth_for_server = query_settings.max_remote_write_network_bandwidth_for_server; - if (shared->server_settings.max_remote_write_network_bandwidth_for_server.changed) - bandwidth_for_server = shared->server_settings.max_remote_write_network_bandwidth_for_server.changed; + UInt64 bandwidth_for_server = shared->server_settings.max_remote_write_network_bandwidth_for_server; if (bandwidth_for_server) { auto lock = getLock();