From: Lukas Wagner <l.wagner@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup] notification: don't deserialize notification config when there is nothing to send
Date: Tue, 19 Aug 2025 10:32:53 +0200 [thread overview]
Message-ID: <20250819083253.70007-1-l.wagner@proxmox.com> (raw)
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@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
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
next reply other threads:[~2025-08-19 8:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-19 8:32 Lukas Wagner [this message]
2025-08-22 13:54 ` [pbs-devel] applied: " Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250819083253.70007-1-l.wagner@proxmox.com \
--to=l.wagner@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox