From: Christian Ebner <c.ebner@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup 3/3] api: sync job: log stats for removed vanished entities
Date: Fri, 8 Mar 2024 14:01:50 +0100 [thread overview]
Message-ID: <20240308130150.310352-4-c.ebner@proxmox.com> (raw)
In-Reply-To: <20240308130150.310352-1-c.ebner@proxmox.com>
Extend the current task log summary to include a log entry stating the
number of removed because vanished on the source side snapshots,
backup groups and namespaces.
The additional task log line states, e.g.:
> Summary: removed vanished: snapshots: 2, groups: 1, namespaces: 0
The log line is not shown if the sync jobs `remove_vanished` flag was
not set and therefore no removed vanished stats are present.
Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
---
src/api2/pull.rs | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/api2/pull.rs b/src/api2/pull.rs
index 29abc1c2..59db3660 100644
--- a/src/api2/pull.rs
+++ b/src/api2/pull.rs
@@ -161,6 +161,16 @@ pub fn do_sync_job(
task_log!(worker, "Summary: sync job found no new data to pull");
}
+ if let Some(removed) = pull_stats.removed {
+ task_log!(
+ worker,
+ "Summary: removed vanished: snapshots: {}, groups: {}, namespaces: {}",
+ removed.snapshots,
+ removed.groups,
+ removed.namespaces,
+ );
+ }
+
task_log!(worker, "sync job '{}' end", &job_id);
Ok(())
--
2.39.2
next prev parent reply other threads:[~2024-03-08 13:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-08 13:01 [pbs-devel] [PATCH proxmox-backup 0/3] add removed vanished stats to sync job log Christian Ebner
2024-03-08 13:01 ` [pbs-devel] [PATCH proxmox-backup 1/3] datastore: group: return basic stats on backup group destroy Christian Ebner
2024-03-08 13:01 ` [pbs-devel] [PATCH proxmox-backup 2/3] server: sync job: include removed vanished stats Christian Ebner
2024-03-08 13:01 ` Christian Ebner [this message]
2024-03-25 17:03 ` [pbs-devel] applied-series: [PATCH proxmox-backup 0/3] add removed vanished stats to sync job log 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=20240308130150.310352-4-c.ebner@proxmox.com \
--to=c.ebner@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