From 7abfaf086ba393959df15a684dabeddbb9ba188d 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 (cherry picked from commit e208b79574eef579ba51423ac6f7aa6105c174ba) --- 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 5fa753b88830..ae117b4b23f4 100644 --- a/src/rgw/rgw_notify.cc +++ b/src/rgw/rgw_notify.cc @@ -141,6 +141,9 @@ class Manager { 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