Commit Graph

9 Commits

Author SHA1 Message Date
Azat Khuzhin
3c80e30f02 Fix per-query IO/BACKUPs throttling settings (when default profile has them)
When some of this settings was set for default profile (in
users.xml/users.yml), then it will be always used regardless of what
user passed.

Fix this by not inherit per-query throttlers, for this they should be
reset before making query context and they should not be initialized as
before in Context::makeQueryContext(), since makeQueryContext() called
too early, when user settings was not read yet.

But there we had also initialization of per-server throttling, move this
into the ContextSharedPart::configureServerWideThrottling(), and call it
once we have ServerSettings set.

Also note, that this patch makes the following settings - server
settings:
- max_replicated_fetches_network_bandwidth_for_server
- max_replicated_sends_network_bandwidth_for_server
But this change should not affect anybody, since it is done with
compatiblity (i.e. if this setting is set in users profile it will be
read from it as well as a fallback).

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-05-17 12:12:39 +02:00
Mikhail f. Shiryaev
e6f5a3f98b
Apply black formatter to all *.py files in the repo 2022-03-22 17:39:58 +01:00
Alexander Tokmakov
d8a7ffaa65 minor improvement for test_replicated_fetches_bandwidth 2021-11-16 16:02:07 +03:00
alesapin
f7babe5cd9 Fix build and better test 2021-06-02 11:22:44 +03:00
alesapin
feed2636f4 Add exponential smoothing to Throttler 2021-06-02 01:07:29 +03:00
alesapin
764902c8d3 Remove print 2021-05-28 00:25:17 +03:00
alesapin
a961100916 More stable test 2021-05-27 18:02:06 +03:00
alesapin
6860946d3c Cleanup in test 2021-05-27 16:00:08 +03:00
alesapin
2985def91d Add tests 2021-05-27 15:54:47 +03:00