From: Dietmar Maurer <dietmar@proxmox.com>
To: Proxmox Backup Server development discussion
<pbs-devel@lists.proxmox.com>,
Dominik Csapak <d.csapak@proxmox.com>
Subject: Re: [pbs-devel] [PATCH proxmox-backup v2] client/pull: log snapshots that are skipped because of time
Date: Fri, 4 Jun 2021 15:54:32 +0200 (CEST) [thread overview]
Message-ID: <1669610747.49.1622814872295@webmail.proxmox.com> (raw)
> +impl std::fmt::Display for SkipInfo {
> + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
> + if self.count > 1 {
> + write!(
> + f,
> + "{} snapshots ({}..{}) that are older than the newest local snapshot",
> + self.count,
> + proxmox::tools::time::epoch_to_rfc3339_utc(self.oldest)
> + .map_err(|_| std::fmt::Error)?,
> + proxmox::tools::time::epoch_to_rfc3339_utc(self.newest)
> + .map_err(|_| std::fmt::Error)?,
> + )
what is the purpose of this complex message (why we want to show self.oldest and self.newest)?
Its confusing me more than it helps...
> + } else if self.count == 1 {
> + write!(
> + f,
> + "1 snapshot ({}) that is older than the newest local snapshot",
> + proxmox::tools::time::epoch_to_rfc3339_utc(self.oldest)
> + .map_err(|_| std::fmt::Error)?,
> + )
do we really need this special case?
> + } else {
> + write!(f, "0 snapshots")
Instead, I would avoid to call this function if count is 0 ...
> + }
> + }
> +}
> +
> pub async fn pull_group(
next reply other threads:[~2021-06-04 13:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-04 13:54 Dietmar Maurer [this message]
2021-06-04 14:03 ` Dominik Csapak
-- strict thread matches above, loose matches on Subject: below --
2021-06-07 8:30 Dominik Csapak
2021-06-04 10:43 Dominik Csapak
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=1669610747.49.1622814872295@webmail.proxmox.com \
--to=dietmar@proxmox.com \
--cc=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 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.