diff options
author | galaxycrab <UgnineSirdis@ydb.tech> | 2022-09-16 15:44:33 +0300 |
---|---|---|
committer | galaxycrab <UgnineSirdis@ydb.tech> | 2022-09-16 15:44:33 +0300 |
commit | 95f0da341aaf0f5bb6701d4d425970535b1d79db (patch) | |
tree | ec422fd7979359ac4eb1cd90913084c52c921c1a | |
parent | e627a759adbd8b9cb75c9e6215f1793a7b52e73f (diff) | |
download | ydb-95f0da341aaf0f5bb6701d4d425970535b1d79db.tar.gz |
Fix CPU quota request
-rw-r--r-- | ydb/core/yq/libs/rate_limiter/quoter_service/quoter_service.cpp | 2 | ||||
-rw-r--r-- | ydb/library/yql/dq/actors/compute/dq_async_compute_actor.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/ydb/core/yq/libs/rate_limiter/quoter_service/quoter_service.cpp b/ydb/core/yq/libs/rate_limiter/quoter_service/quoter_service.cpp index a5036a4a8a..98ff1642ad 100644 --- a/ydb/core/yq/libs/rate_limiter/quoter_service/quoter_service.cpp +++ b/ydb/core/yq/libs/rate_limiter/quoter_service/quoter_service.cpp @@ -141,7 +141,7 @@ public: void AcquireResource(const TResourceKey& key, ui64 amount, ui64 cookie) { LOG_T("Send acquire resource request to {\"" << key.first << "\", \"" << key.second << "\"}. Amount: " << amount << ". Cookie: " << cookie); - auto asyncStatus = YdbConnection->RateLimiterClient.AcquireResource(key.first, key.second, NYdb::NRateLimiter::TAcquireResourceSettings().Amount(amount).IsUsedAmount(true)); + auto asyncStatus = YdbConnection->RateLimiterClient.AcquireResource(key.first, key.second, NYdb::NRateLimiter::TAcquireResourceSettings().Amount(amount)); asyncStatus.Subscribe([actorSystem = NActors::TActivationContext::ActorSystem(), selfId = SelfId(), cookie, key, amount](const NYdb::TAsyncStatus& status) { actorSystem->Send(new NActors::IEventHandle(selfId, selfId, new TEvPrivate::TEvQuotaReceived(status.GetValueSync(), key.first, key.second, amount), 0, cookie)); }); diff --git a/ydb/library/yql/dq/actors/compute/dq_async_compute_actor.cpp b/ydb/library/yql/dq/actors/compute/dq_async_compute_actor.cpp index 7eb7ec8007..1113dd051f 100644 --- a/ydb/library/yql/dq/actors/compute/dq_async_compute_actor.cpp +++ b/ydb/library/yql/dq/actors/compute/dq_async_compute_actor.cpp @@ -92,8 +92,8 @@ public: void InitExtraMonCounters(const ::NMonitoring::TDynamicCounterPtr& taskCounters) { if (taskCounters && UseCpuQuota()) { - CpuTimeGetQuotaLatency = taskCounters->GetSubgroup("subsystem", "mkql")->GetHistogram("CpuTimeGetQuotaLatencyMs", NMonitoring::ExplicitHistogram({0, 1, 5, 10, 50, 100, 500, 1000, 10'000, 60'000, 600'000})); - CpuTimeQuotaWaitDelay = taskCounters->GetSubgroup("subsystem", "mkql")->GetHistogram("CpuTimeQuotaWaitDelayMs", NMonitoring::ExplicitHistogram({0, 1, 5, 10, 50, 100, 500, 1000, 10'000, 60'000, 600'000})); + CpuTimeGetQuotaLatency = taskCounters->GetSubgroup("subsystem", "mkql")->GetHistogram("CpuTimeGetQuotaLatencyMs", NMonitoring::ExplicitHistogram({0, 1, 5, 10, 50, 100, 500, 1000, 5000, 10'000, 60'000, 600'000})); + CpuTimeQuotaWaitDelay = taskCounters->GetSubgroup("subsystem", "mkql")->GetHistogram("CpuTimeQuotaWaitDelayMs", NMonitoring::ExplicitHistogram({0, 1, 5, 10, 50, 100, 500, 1000, 5000, 10'000, 60'000, 600'000})); } } |