diff options
author | don-dron <don-dron@yandex-team.com> | 2024-06-03 10:41:32 +0300 |
---|---|---|
committer | don-dron <don-dron@yandex-team.com> | 2024-06-03 10:57:10 +0300 |
commit | 28ff234f758e7fd2f42f229a4b55ff70506f0015 (patch) | |
tree | 4762196f961eda8011d4072c00f42625fc98e988 | |
parent | 02224a85ba31992c1ce4ac6e43f7b6690c531ddd (diff) | |
download | ydb-28ff234f758e7fd2f42f229a4b55ff70506f0015.tar.gz |
YT-21901: Correct rpc method queue limiting
0a8837e8e30b04fcab64bbb005c2e3233e20e18d
-rw-r--r-- | yt/yt/core/rpc/service_detail.cpp | 4 | ||||
-rw-r--r-- | yt/yt/core/rpc/unittests/rpc_ut.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/yt/yt/core/rpc/service_detail.cpp b/yt/yt/core/rpc/service_detail.cpp index d0e0e37ef2..5581919639 100644 --- a/yt/yt/core/rpc/service_detail.cpp +++ b/yt/yt/core/rpc/service_detail.cpp @@ -1389,13 +1389,13 @@ void TRequestQueue::ConfigureWeightThrottler(const TThroughputThrottlerConfigPtr bool TRequestQueue::IsQueueSizeLimitExceeded() const { - return QueueSize_.load(std::memory_order::relaxed) >= + return QueueSize_.load(std::memory_order::relaxed) > RuntimeInfo_->QueueSizeLimit.load(std::memory_order::relaxed); } bool TRequestQueue::IsQueueByteSizeLimitExceeded() const { - return QueueByteSize_.load(std::memory_order::relaxed) >= + return QueueByteSize_.load(std::memory_order::relaxed) > RuntimeInfo_->QueueByteSizeLimit.load(std::memory_order::relaxed); } diff --git a/yt/yt/core/rpc/unittests/rpc_ut.cpp b/yt/yt/core/rpc/unittests/rpc_ut.cpp index f4c7cf1338..864988488f 100644 --- a/yt/yt/core/rpc/unittests/rpc_ut.cpp +++ b/yt/yt/core/rpc/unittests/rpc_ut.cpp @@ -789,12 +789,12 @@ TYPED_TEST(TRpcTest, RequestQueueSizeLimit) // Concurrency byte limit + queue byte size limit = 10 + 20 = 30. // First 30 requests must be successful, 31st request must be failed. - for (int i = 0; i < 30; ++i) { + for (int i = 0; i <= 30; ++i) { proxies.push_back(TTestProxy(this->CreateChannel())); proxies[i].SetDefaultTimeout(TDuration::Seconds(60.0)); } - for (int i = 0; i < 30; ++i) { + for (int i = 0; i <= 30; ++i) { auto req = proxies[i].SlowCall(); futures.push_back(req->Invoke().AsVoid()); } |