]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/pubsub: Waiter unlocks before suspend 60133/head
authorCasey Bodley <cbodley@redhat.com>
Wed, 22 May 2024 12:24:26 +0000 (08:24 -0400)
committerliangmingyuan <liangmingyuan@baidu.com>
Sat, 5 Oct 2024 08:32:25 +0000 (16:32 +0800)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 629ad4562bdfce798090788236e6aa0b25476e9d)

src/rgw/driver/rados/rgw_pubsub_push.cc

index 69eb5c9ff326224e6414edd8c207513f1f5fc53d..2d569d1b0c99f38b70b300d8957ecd933e62fe0d 100644 (file)
@@ -154,10 +154,10 @@ public:
       auto yield = y.get_yield_context();
       auto&& token = yield[ec];
       boost::asio::async_initiate<boost::asio::yield_context, Signature>(
-          [this] (auto handler, auto ex) {
+          [this, &l] (auto handler, auto ex) {
             completion = Completion::create(ex, std::move(handler));
+            l.unlock(); // unlock before suspend
           }, token, yield.get_executor());
-      l.unlock();
       return -ec.value();
     }
     cond.wait(l, [this]{return (done==true);});