* [pbs-devel] [PATCH proxmox-backup 1/2] sync: pull: mention why last snapshot of previous sync is resynced
@ 2024-11-04 12:56 Christian Ebner
2024-11-04 12:56 ` [pbs-devel] [PATCH proxmox-backup 2/2] sync: pull: simplify logic for source snapshot filtering Christian Ebner
2024-11-04 14:14 ` [pbs-devel] applied-series: [PATCH proxmox-backup 1/2] sync: pull: mention why last snapshot of previous sync is resynced Fabian Grünbichler
0 siblings, 2 replies; 3+ messages in thread
From: Christian Ebner @ 2024-11-04 12:56 UTC (permalink / raw)
To: pbs-devel
The last snapshot synced during the previous sync job might not have
been fully completed just yet (e.g. backup log still missing,
verification still ongoing, ...).
Explicitley mention the reason and that the resync is therefore
intentional by a comment in the filter logic.
Suggested-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
---
changes since version 1:
- no present in previous version
src/server/pull.rs | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/server/pull.rs b/src/server/pull.rs
index cc1427196..8d8461cb2 100644
--- a/src/server/pull.rs
+++ b/src/server/pull.rs
@@ -528,6 +528,8 @@ async fn pull_group(
.enumerate()
.filter(|&(pos, ref dir)| {
source_snapshots.insert(dir.time);
+ // Note: Last sync times final snapshot might not have been completely
+ // done yet on the source side, keep it include for a resync.
if last_sync_time > dir.time {
already_synced_skip_info.update(dir.time);
return false;
--
2.39.5
_______________________________________________
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
* [pbs-devel] [PATCH proxmox-backup 2/2] sync: pull: simplify logic for source snapshot filtering
2024-11-04 12:56 [pbs-devel] [PATCH proxmox-backup 1/2] sync: pull: mention why last snapshot of previous sync is resynced Christian Ebner
@ 2024-11-04 12:56 ` Christian Ebner
2024-11-04 14:14 ` [pbs-devel] applied-series: [PATCH proxmox-backup 1/2] sync: pull: mention why last snapshot of previous sync is resynced Fabian Grünbichler
1 sibling, 0 replies; 3+ messages in thread
From: Christian Ebner @ 2024-11-04 12:56 UTC (permalink / raw)
To: pbs-devel
Decouple the actual filter logic from the skip reason output logic by
pulling the latter out of the filter closue.
Makes the filtering logic more intuitive.
Reviewed-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
---
changes since version 1:
- no changes
src/server/pull.rs | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/src/server/pull.rs b/src/server/pull.rs
index 8d8461cb2..0afb16bc0 100644
--- a/src/server/pull.rs
+++ b/src/server/pull.rs
@@ -533,23 +533,26 @@ async fn pull_group(
if last_sync_time > dir.time {
already_synced_skip_info.update(dir.time);
return false;
- } else if already_synced_skip_info.count > 0 {
- info!("{already_synced_skip_info}");
- already_synced_skip_info.reset();
}
if pos < cutoff && last_sync_time != dir.time {
transfer_last_skip_info.update(dir.time);
return false;
- } else if transfer_last_skip_info.count > 0 {
- info!("{transfer_last_skip_info}");
- transfer_last_skip_info.reset();
}
true
})
.map(|(_, dir)| dir)
.collect();
+ if already_synced_skip_info.count > 0 {
+ info!("{already_synced_skip_info}");
+ already_synced_skip_info.reset();
+ }
+ if transfer_last_skip_info.count > 0 {
+ info!("{transfer_last_skip_info}");
+ transfer_last_skip_info.reset();
+ }
+
// start with 65536 chunks (up to 256 GiB)
let downloaded_chunks = Arc::new(Mutex::new(HashSet::with_capacity(1024 * 64)));
--
2.39.5
_______________________________________________
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
* [pbs-devel] applied-series: [PATCH proxmox-backup 1/2] sync: pull: mention why last snapshot of previous sync is resynced
2024-11-04 12:56 [pbs-devel] [PATCH proxmox-backup 1/2] sync: pull: mention why last snapshot of previous sync is resynced Christian Ebner
2024-11-04 12:56 ` [pbs-devel] [PATCH proxmox-backup 2/2] sync: pull: simplify logic for source snapshot filtering Christian Ebner
@ 2024-11-04 14:14 ` Fabian Grünbichler
1 sibling, 0 replies; 3+ messages in thread
From: Fabian Grünbichler @ 2024-11-04 14:14 UTC (permalink / raw)
To: Proxmox Backup Server development discussion
On November 4, 2024 1:56 pm, Christian Ebner wrote:
> The last snapshot synced during the previous sync job might not have
> been fully completed just yet (e.g. backup log still missing,
> verification still ongoing, ...).
> Explicitley mention the reason and that the resync is therefore
> intentional by a comment in the filter logic.
>
> Suggested-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
> Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
> ---
> changes since version 1:
> - no present in previous version
>
> src/server/pull.rs | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/src/server/pull.rs b/src/server/pull.rs
> index cc1427196..8d8461cb2 100644
> --- a/src/server/pull.rs
> +++ b/src/server/pull.rs
> @@ -528,6 +528,8 @@ async fn pull_group(
> .enumerate()
> .filter(|&(pos, ref dir)| {
> source_snapshots.insert(dir.time);
> + // Note: Last sync times final snapshot might not have been completely
> + // done yet on the source side, keep it include for a resync.
> if last_sync_time > dir.time {
> already_synced_skip_info.update(dir.time);
> return false;
> --
> 2.39.5
>
>
>
> _______________________________________________
> pbs-devel mailing list
> pbs-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
>
_______________________________________________
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:[~2024-11-04 14:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-04 12:56 [pbs-devel] [PATCH proxmox-backup 1/2] sync: pull: mention why last snapshot of previous sync is resynced Christian Ebner
2024-11-04 12:56 ` [pbs-devel] [PATCH proxmox-backup 2/2] sync: pull: simplify logic for source snapshot filtering Christian Ebner
2024-11-04 14:14 ` [pbs-devel] applied-series: [PATCH proxmox-backup 1/2] sync: pull: mention why last snapshot of previous sync is resynced Fabian Grünbichler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox