]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/notification: fix persistent notification hang when ack-levl=none 39790/head
authorYuval Lifshitz <ylifshit@redhat.com>
Tue, 2 Mar 2021 17:42:22 +0000 (19:42 +0200)
committerYuval Lifshitz <ylifshit@redhat.com>
Tue, 2 Mar 2021 17:42:22 +0000 (19:42 +0200)
when a persistent notifications for amqp/kafka are set with
amqp/kafka-ack-level=none, only the first notification is sent.
any consequent notifications are not sent.

Fixes: https://tracker.ceph.com/issues/49557
Signed-off-by: Yuval Lifshitz <ylifshit@redhat.com>
src/rgw/rgw_notify.cc

index 10fd3b57baceaae3b080914a7174d4007ad21d1c..e406c110b7ea47be3bca80f2abac35ea8d62793a 100644 (file)
@@ -145,6 +145,9 @@ class Manager : public DoutPrefixProvider {
       timer(io_context) {}  
  
     void async_wait(spawn::yield_context yield) { 
+      if (pending_tokens == 0) {
+        return;
+      }
       timer.expires_from_now(infinite_duration);
       boost::system::error_code ec; 
       timer.async_wait(yield[ec]);