Ignore deprecated values max_remote_{read,write}_network_bandwidth_for_server

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
This commit is contained in:
Azat Khuzhin 2023-04-03 14:50:47 +02:00
parent ad96d3c249
commit 684ecc24e2

View File

@ -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();