From: Yuval Lifshitz Date: Tue, 2 Mar 2021 17:42:22 +0000 (+0200) Subject: rgw/notification: fix persistent notification hang when ack-levl=none X-Git-Tag: v17.1.0~2743^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e208b79574eef579ba51423ac6f7aa6105c174ba;p=ceph.git rgw/notification: fix persistent notification hang when ack-levl=none 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 --- diff --git a/src/rgw/rgw_notify.cc b/src/rgw/rgw_notify.cc index 10fd3b57bac..e406c110b7e 100644 --- a/src/rgw/rgw_notify.cc +++ b/src/rgw/rgw_notify.cc @@ -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]);