]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/notifications: prevent infinite loop in case of malformed notifications 64010/head
authorYuval Lifshitz <ylifshit@ibm.com>
Tue, 24 Jun 2025 10:02:57 +0000 (10:02 +0000)
committerYuval Lifshitz <ylifshit@ibm.com>
Wed, 25 Jun 2025 15:09:20 +0000 (15:09 +0000)
if we fail to decode a notification entry we should remove it.
o/w we will keep failing on that entry

Signed-off-by: Yuval Lifshitz <ylifshit@ibm.com>
src/rgw/driver/rados/rgw_notify.cc

index dec13d7630c78c8eb0c2510cca2cebe1695cd144..dd735ebf005cc01240d250659219f4aebf0a6cf8 100644 (file)
@@ -213,8 +213,9 @@ private:
     try {
       decode(event_entry, iter);
     } catch (buffer::error& err) {
-      ldpp_dout(this, 5) << "WARNING: failed to decode entry. error: " << err.what() << dendl;
-      return EntryProcessingResult::Failure;
+      ldpp_dout(this, 1) << "WARNING: failed to decode entry marker: " << entry.marker
+        << ". error: " << err.what() << dendl;
+      return EntryProcessingResult::Expired;
     }
 
     if (event_entry.creation_time == ceph::coarse_real_clock::zero()) {