]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw: fix overflow of outstanding counter in SimpleThrottler
authorXinying Song <songxinyingftd@gmail.com>
Sat, 29 Nov 2025 12:31:07 +0000 (20:31 +0800)
committerXinying Song <songxinyingftd@gmail.com>
Tue, 2 Dec 2025 09:59:52 +0000 (17:59 +0800)
Fixes: https://tracker.ceph.com/issues/74038
Signed-off-by: Xinying Song <songxinyingftd@gmail.com>
src/rgw/rgw_dmclock_async_scheduler.h

index eec9d8d307cb9ccf3c3fe509a084fc90e6ae9911..6612ec5c6204ca538e21b2581249d3db42cdc0f5 100644 (file)
@@ -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;