aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsavnik <savnik@yandex-team.com>2023-08-24 12:47:54 +0300
committersavnik <savnik@yandex-team.com>2023-08-24 13:02:32 +0300
commit88ec08523b5f8060245fc590a437a7eee8ab1244 (patch)
tree38a666c3a33fe95ed997a3c9d104dcbe9298fdf9
parent10525b5f618b3f44ed3285dc6ca6ea78f516928d (diff)
downloadydb-88ec08523b5f8060245fc590a437a7eee8ab1244.tar.gz
Fix read quoter inflight throttling calc
-rw-r--r--ydb/core/persqueue/read_quoter.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/ydb/core/persqueue/read_quoter.cpp b/ydb/core/persqueue/read_quoter.cpp
index d5c26bbc20..91aea62fed 100644
--- a/ydb/core/persqueue/read_quoter.cpp
+++ b/ydb/core/persqueue/read_quoter.cpp
@@ -156,6 +156,8 @@ void TReadQuoter::HandleUpdateAccountQuotaCounters(NAccountReadQuoterEvents::TEv
void TReadQuoter::UpdateCounters(const TActorContext& ctx) {
if (!WaitingInflightReadRequests.empty()) {
InflightLimitSlidingWindow.Update((ctx.Now() - InflightIsFullStartTime).MicroSeconds(), ctx.Now());
+ } else {
+ InflightLimitSlidingWindow.Update(ctx.Now());
}
Send(PartitionActor, new NReadQuoterEvents::TEvQuotaCountersUpdated(InflightLimitSlidingWindow.GetValue() / 60));
}