From: Xinying Song Date: Sat, 29 Nov 2025 12:31:07 +0000 (+0800) Subject: rgw: fix overflow of outstanding counter in SimpleThrottler X-Git-Tag: v21.0.0~287^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=24aea195e9e6864efa383449061226d21f4a9a60;p=ceph.git rgw: fix overflow of outstanding counter in SimpleThrottler Fixes: https://tracker.ceph.com/issues/74038 Signed-off-by: Xinying Song --- 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;