From: Christian Ebner <c.ebner@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [PATCH proxmox-backup 3/4] server: pull: log snapshot sync start in pull_snapshot_from
Date: Tue, 1 Dec 2026 15:14:00 +0100 [thread overview]
Message-ID: <20261201141401.438577-4-c.ebner@proxmox.com> (raw)
In-Reply-To: <20261201141401.438577-1-c.ebner@proxmox.com>
Move the initial start-sync and re-sync log messages from
pull_snapshot() up to pull_snapshot_from(), where is_new is determined,
and drop the is_new parameter from pull_snapshot().
No functional changes.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
---
src/server/pull.rs | 35 +++++++++++++++++------------------
1 file changed, 17 insertions(+), 18 deletions(-)
diff --git a/src/server/pull.rs b/src/server/pull.rs
index e5bc853da..55f8773a8 100644
--- a/src/server/pull.rs
+++ b/src/server/pull.rs
@@ -628,26 +628,9 @@ async fn pull_snapshot<'a>(
snapshot: &'a pbs_datastore::BackupDir,
encountered_chunks: Arc<Mutex<EncounteredChunks>>,
corrupt: bool,
- is_new: bool,
log_sender: Arc<LogLineSender>,
) -> Result<Option<SyncStats>, Error> {
let prefix = snapshot.backup_time_string().to_owned();
- if is_new {
- log_sender
- .log(Level::INFO, format!("{prefix}: start sync"))
- .await?;
- } else if corrupt {
- log_sender
- .log(
- Level::INFO,
- format!("re-sync snapshot {prefix} due to corruption"),
- )
- .await?;
- } else {
- log_sender
- .log(Level::INFO, format!("re-sync snapshot {prefix}"))
- .await?;
- }
let manifest_name = snapshot.full_archive_path(&MANIFEST_BLOB_NAME);
let client_log_name = snapshot.full_archive_path(&CLIENT_LOG_BLOB_NAME);
@@ -1115,13 +1098,29 @@ async fn pull_snapshot_from<'a>(
.create_locked_backup_dir(snapshot.backup_ns(), snapshot.as_ref())
.context(prefix.clone())?;
+ if is_new {
+ log_sender
+ .log(Level::INFO, format!("{prefix}: start sync"))
+ .await?;
+ } else if corrupt {
+ log_sender
+ .log(
+ Level::INFO,
+ format!("re-sync snapshot {prefix} due to corruption"),
+ )
+ .await?;
+ } else {
+ log_sender
+ .log(Level::INFO, format!("re-sync snapshot {prefix}"))
+ .await?;
+ }
+
let result = pull_snapshot(
params,
reader,
snapshot,
encountered_chunks,
corrupt,
- is_new,
Arc::clone(&log_sender),
)
.await;
--
2.47.3
next prev parent reply other threads:[~2026-12-01 14:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 14:13 [PATCH proxmox-backup 0/4] server: pull: reduce lock contention on unchanged snapshots Christian Ebner
2026-12-01 14:13 ` [PATCH proxmox-backup 1/4] pbs-config: add helper to try upgrade shared lock to exclusive lock Christian Ebner
2026-12-01 14:13 ` [PATCH proxmox-backup 2/4] server: pull: load source manifest into memory instead of a temp file Christian Ebner
2026-12-01 14:14 ` Christian Ebner [this message]
2026-12-01 14:14 ` [PATCH proxmox-backup 4/4] server: pull: check unchanged snapshots under a shared lock Christian Ebner
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=20261201141401.438577-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