public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup] pbs-client: print error when we couldn't download previous fidx/didx
Date: Mon,  4 Apr 2022 13:45:02 +0200	[thread overview]
Message-ID: <20220404114502.4074965-1-d.csapak@proxmox.com> (raw)

When we have a previous manifest, we try to download the fidx/didx files
to get the known chunks list. We continue if that fails (which is ok),
but we did not print any error, leading to a confusing backup output,
since the users would expect that chunks will be reused.

Printing the error should at least make it apparent that something did
not work correctly.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
i sent it with 'eprintln' instead of the log macro, since that series
was not applied yet. i'll happily resend it when thats done with the log
macro, or i can send it now but i guess then hannes patches will not
apply anymore since i'd have to add the log dependency myself

 pbs-client/src/backup_writer.rs | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/pbs-client/src/backup_writer.rs b/pbs-client/src/backup_writer.rs
index b02798bd..c81182a7 100644
--- a/pbs-client/src/backup_writer.rs
+++ b/pbs-client/src/backup_writer.rs
@@ -289,22 +289,28 @@ impl BackupWriter {
             // try, but ignore errors
             match ArchiveType::from_path(archive_name) {
                 Ok(ArchiveType::FixedIndex) => {
-                    let _ = self
+                    if let Err(err) = self
                         .download_previous_fixed_index(
                             archive_name,
                             &manifest,
                             known_chunks.clone(),
                         )
-                        .await;
+                        .await
+                    {
+                        eprintln!("Error downloading .fidx from previous manifest: {}", err);
+                    }
                 }
                 Ok(ArchiveType::DynamicIndex) => {
-                    let _ = self
+                    if let Err(err) = self
                         .download_previous_dynamic_index(
                             archive_name,
                             &manifest,
                             known_chunks.clone(),
                         )
-                        .await;
+                        .await
+                    {
+                        eprintln!("Error downloading .didx from previous manifest: {}", err);
+                    }
                 }
                 _ => { /* do nothing */ }
             }
-- 
2.30.2





             reply	other threads:[~2022-04-04 11:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-04 11:45 Dominik Csapak [this message]
2022-04-06  8:13 ` [pbs-devel] applied: " Dietmar Maurer

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=20220404114502.4074965-1-d.csapak@proxmox.com \
    --to=d.csapak@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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal