* [pbs-devel] [PATCH proxmox-backup] notification: don't deserialize notification config when there is nothing to send
@ 2025-08-19 8:32 Lukas Wagner
2025-08-22 13:54 ` [pbs-devel] applied: " Thomas Lamprecht
0 siblings, 1 reply; 2+ messages in thread
From: Lukas Wagner @ 2025-08-19 8:32 UTC (permalink / raw)
To: pbs-devel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* [pbs-devel] applied: [PATCH proxmox-backup] notification: don't deserialize notification config when there is nothing to send
2025-08-19 8:32 [pbs-devel] [PATCH proxmox-backup] notification: don't deserialize notification config when there is nothing to send Lukas Wagner
@ 2025-08-22 13:54 ` Thomas Lamprecht
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2025-08-22 13:54 UTC (permalink / raw)
To: pbs-devel, Lukas Wagner
On Tue, 19 Aug 2025 10:32:53 +0200, Lukas Wagner wrote:
> 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.
>
>
> [...]
Applied, thanks!
[1/1] notification: don't deserialize notification config when there is nothing to send
commit: 5ae0ab69a8de3c0cd9a7fe45696edff9a6575123
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-08-22 13:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-19 8:32 [pbs-devel] [PATCH proxmox-backup] notification: don't deserialize notification config when there is nothing to send Lukas Wagner
2025-08-22 13:54 ` [pbs-devel] applied: " Thomas Lamprecht
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.