From 684ecc24e217852af32eceb855e6f3319d724709 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Mon, 3 Apr 2023 14:50:47 +0200 Subject: [PATCH] Ignore deprecated values max_remote_{read,write}_network_bandwidth_for_server Signed-off-by: Azat Khuzhin --- src/Interpreters/Context.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/Interpreters/Context.cpp b/src/Interpreters/Context.cpp index 6fd0f256ac4..dfe7342ce02 100644 --- a/src/Interpreters/Context.cpp +++ b/src/Interpreters/Context.cpp @@ -2333,10 +2333,9 @@ ThrottlerPtr Context::getRemoteReadThrottler() const ThrottlerPtr throttler; const auto & query_settings = getSettingsRef(); - UInt64 bandwidth_for_server = std::max( - query_settings.max_remote_read_network_bandwidth_for_server, - /// compatibility - shared->server_settings.max_remote_read_network_bandwidth_for_server); + 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; if (bandwidth_for_server) { auto lock = getLock(); @@ -2361,10 +2360,9 @@ ThrottlerPtr Context::getRemoteWriteThrottler() const ThrottlerPtr throttler; const auto & query_settings = getSettingsRef(); - UInt64 bandwidth_for_server = std::max( - query_settings.max_remote_write_network_bandwidth_for_server, - /// compatibility - shared->server_settings.max_remote_write_network_bandwidth_for_server); + 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; if (bandwidth_for_server) { auto lock = getLock();