]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix overflow of outstanding counter in SimpleThrottler 67692/head
authorXinying Song <songxinyingftd@gmail.com>
Sat, 29 Nov 2025 12:31:07 +0000 (20:31 +0800)
committerXinying Song <songxinyingftd@gmail.com>
Fri, 6 Mar 2026 06:53:16 +0000 (14:53 +0800)
Fixes: https://tracker.ceph.com/issues/74038
Signed-off-by: Xinying Song <songxinyingftd@gmail.com>
(cherry picked from commit 24aea195e9e6864efa383449061226d21f4a9a60)

src/rgw/rgw_dmclock_async_scheduler.h

index d8de05737131c8b430c4c8d2c54db00a3cd6829b..da702f397a6e8c0789a0727b8beec38bc7781308 100644 (file)
@@ -194,10 +194,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;