[pbs-devel] [PATCH proxmox-backup] notification: don't deserialize notification config when there is nothing to send

Lukas Wagner l.wagner at proxmox.com
Tue Aug 19 10:32:53 CEST 2025


The privileged daemon checks every couple seconds if the unprivileged
daemon has enqueued any notifications. This change makes the worker
function exit early if there is no notification to send, which allows us
to avoid deserializing the notification config when it is not really
needed.

Signed-off-by: Lukas Wagner <l.wagner at proxmox.com>
---

Notes:
    Noticed this by accident when using `strace` to debug some other issue
    reported in the forum.

 src/server/notifications/mod.rs | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/server/notifications/mod.rs b/src/server/notifications/mod.rs
index 801e65ec6..95ff9ef18 100644
--- a/src/server/notifications/mod.rs
+++ b/src/server/notifications/mod.rs
@@ -71,6 +71,10 @@ async fn send_queued_notifications() -> Result<(), Error> {
         }
     }
 
+    if notifications.is_empty() {
+        return Ok(());
+    }
+
     // Make sure that we send the oldest notification first
     notifications.sort_unstable_by_key(|n| n.timestamp());
 
-- 
2.47.2





More information about the pbs-devel mailing list