* [pbs-devel] [PATCH proxmox] sync: pull: fix regression in resync of corrupt snapshots
@ 2025-09-17 10:29 Christian Ebner
2025-09-17 13:41 ` Christian Ebner
2025-09-18 6:45 ` Hannes Laimer
0 siblings, 2 replies; 3+ messages in thread
From: Christian Ebner @ 2025-09-17 10:29 UTC (permalink / raw)
To: pbs-devel
In commit eea1176f ("pull: refactor source snapshot list filtering
logic") the filtering of snapshots to be synced when pulling from the
source datastore was split in preparation for correct pre-filtering
of the snapshot when the verified-only or encrypted-only flags have
been set.
This however introduced a regression, as previously also snapshots
older than the newest snapshot on the target were included in the
list, if the `resync_corrupt` parameter is set and the corresponding
target snapshot failed verification or the loading of the manifest to
check this failed, now however being filtered out unconditionally.
Fix this by keeping these snapshots in the list in case the
`resync_corrupt` flag is set.
Also rename the boolean flag from the incorrect `verified` to
`needs_resync`, in order to reflect the behaviour.
Fixes: eea1176f ("pull: refactor source snapshot list filtering logic")
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
---
Noted while investigating an unrelated issue.
src/server/pull.rs | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/server/pull.rs b/src/server/pull.rs
index e1c8a7acd..08e6e6b64 100644
--- a/src/server/pull.rs
+++ b/src/server/pull.rs
@@ -676,7 +676,10 @@ async fn pull_group(
let list: Vec<(BackupDir, bool)> = list
.into_iter()
.enumerate()
- .filter_map(|(pos, (dir, verified))| {
+ .filter_map(|(pos, (dir, needs_resync))| {
+ if params.resync_corrupt && needs_resync {
+ return Some((dir, needs_resync));
+ }
// Note: the snapshot represented by `last_sync_time` might be missing its backup log
// or post-backup verification state if those were not yet available during the last
// sync run, always resync it
@@ -688,7 +691,7 @@ async fn pull_group(
transfer_last_skip_info.update(dir.time);
return None;
}
- Some((dir, verified))
+ Some((dir, needs_resync))
})
.collect();
--
2.47.3
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [pbs-devel] [PATCH proxmox] sync: pull: fix regression in resync of corrupt snapshots
2025-09-17 10:29 [pbs-devel] [PATCH proxmox] sync: pull: fix regression in resync of corrupt snapshots Christian Ebner
@ 2025-09-17 13:41 ` Christian Ebner
2025-09-18 6:45 ` Hannes Laimer
1 sibling, 0 replies; 3+ messages in thread
From: Christian Ebner @ 2025-09-17 13:41 UTC (permalink / raw)
To: pbs-devel
note that this patch is intended for proxmox-backup of course...
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [pbs-devel] [PATCH proxmox] sync: pull: fix regression in resync of corrupt snapshots
2025-09-17 10:29 [pbs-devel] [PATCH proxmox] sync: pull: fix regression in resync of corrupt snapshots Christian Ebner
2025-09-17 13:41 ` Christian Ebner
@ 2025-09-18 6:45 ` Hannes Laimer
1 sibling, 0 replies; 3+ messages in thread
From: Hannes Laimer @ 2025-09-18 6:45 UTC (permalink / raw)
To: Proxmox Backup Server development discussion, Christian Ebner
Gave this a quick spin and I could reproduce the described problem, the
patch fixes it. This will ignore `transfer_last` though, I think it
makes sense like this, just wanted to note it.
Consider this
Reviewed-by: Hannes Laimer <h.laimer@proxmox.com>
Tested-by: Hannes Laimer <h.laimer@proxmox.com>
On 17.09.25 12:30, Christian Ebner wrote:
> In commit eea1176f ("pull: refactor source snapshot list filtering
> logic") the filtering of snapshots to be synced when pulling from the
> source datastore was split in preparation for correct pre-filtering
> of the snapshot when the verified-only or encrypted-only flags have
> been set.
>
> This however introduced a regression, as previously also snapshots
> older than the newest snapshot on the target were included in the
> list, if the `resync_corrupt` parameter is set and the corresponding
> target snapshot failed verification or the loading of the manifest to
> check this failed, now however being filtered out unconditionally.
>
> Fix this by keeping these snapshots in the list in case the
> `resync_corrupt` flag is set.
>
> Also rename the boolean flag from the incorrect `verified` to
> `needs_resync`, in order to reflect the behaviour.
>
> Fixes: eea1176f ("pull: refactor source snapshot list filtering logic")
> Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
> ---
> Noted while investigating an unrelated issue.
>
> src/server/pull.rs | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/src/server/pull.rs b/src/server/pull.rs
> index e1c8a7acd..08e6e6b64 100644
> --- a/src/server/pull.rs
> +++ b/src/server/pull.rs
> @@ -676,7 +676,10 @@ async fn pull_group(
> let list: Vec<(BackupDir, bool)> = list
> .into_iter()
> .enumerate()
> - .filter_map(|(pos, (dir, verified))| {
> + .filter_map(|(pos, (dir, needs_resync))| {
> + if params.resync_corrupt && needs_resync {
> + return Some((dir, needs_resync));
> + }
> // Note: the snapshot represented by `last_sync_time` might be missing its backup log
> // or post-backup verification state if those were not yet available during the last
> // sync run, always resync it
> @@ -688,7 +691,7 @@ async fn pull_group(
> transfer_last_skip_info.update(dir.time);
> return None;
> }
> - Some((dir, verified))
> + Some((dir, needs_resync))
> })
> .collect();
>
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-09-18 6:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-17 10:29 [pbs-devel] [PATCH proxmox] sync: pull: fix regression in resync of corrupt snapshots Christian Ebner
2025-09-17 13:41 ` Christian Ebner
2025-09-18 6:45 ` Hannes Laimer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox