From e208b79574eef579ba51423ac6f7aa6105c174ba Mon Sep 17 00:00:00 2001 From: Yuval Lifshitz Date: Tue, 2 Mar 2021 19:42:22 +0200 Subject: [PATCH] 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 --- src/rgw/rgw_notify.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/rgw/rgw_notify.cc b/src/rgw/rgw_notify.cc index 10fd3b57bace..e406c110b7ea 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]); -- 2.47.3