]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
neorados: Actually enforce notification queue limit
authorAdam C. Emerson <aemerson@redhat.com>
Wed, 26 Nov 2025 05:54:21 +0000 (00:54 -0500)
committerAdam C. Emerson <aemerson@redhat.com>
Fri, 5 Dec 2025 18:08:33 +0000 (13:08 -0500)
We were adding an overflow marker on every message above capacity, not
just the first, vitiating the purpose of the bound. The shame, the
shame.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
src/neorados/RADOS.cc

index 497fec55c9aec169f4188683e7789d6bd51b7da1..fb59c55c07fd80bf7c6649b9ccc84ae3761f5668 100644 (file)
@@ -1477,7 +1477,9 @@ public:
     } else if (capacity && notifications.size() >= capacity) {
       // We are allowed one over, so the client knows where in the
       // sequence of notifications we started losing data.
-      notifications.push({errc::notification_overflow, {}});
+      if (notifications.size() == capacity) {
+        notifications.push({errc::notification_overflow, {}});
+      }
     } else {
       notifications.push({{},
                          Notification{