From 24aea195e9e6864efa383449061226d21f4a9a60 Mon Sep 17 00:00:00 2001 From: Xinying Song Date: Sat, 29 Nov 2025 20:31:07 +0800 Subject: [PATCH] rgw: fix overflow of outstanding counter in SimpleThrottler Fixes: https://tracker.ceph.com/issues/74038 Signed-off-by: Xinying Song --- src/rgw/rgw_dmclock_async_scheduler.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/rgw/rgw_dmclock_async_scheduler.h b/src/rgw/rgw_dmclock_async_scheduler.h index eec9d8d307cb..6612ec5c6204 100644 --- a/src/rgw/rgw_dmclock_async_scheduler.h +++ b/src/rgw/rgw_dmclock_async_scheduler.h @@ -195,10 +195,12 @@ private: int schedule_request_impl(const client_id&, const ReqParams&, const Time&, const Cost&, optional_yield) override { + auto c = counters(); + if (c != nullptr) { + c->inc(throttle_counters::l_outstanding); + } if (outstanding_requests++ >= max_requests) { - if (auto c = counters(); - c != nullptr) { - c->inc(throttle_counters::l_outstanding); + if (c != nullptr) { c->inc(throttle_counters::l_throttle); } return -EAGAIN; -- 2.47.3