From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 760EB1FF15F for ; Mon, 4 Nov 2024 13:15:11 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id BF944B5FE; Mon, 4 Nov 2024 13:15:19 +0100 (CET) Date: Mon, 04 Nov 2024 13:15:11 +0100 From: Fabian =?iso-8859-1?q?Gr=FCnbichler?= To: Proxmox Backup Server development discussion References: <20241104105830.85612-1-c.ebner@proxmox.com> In-Reply-To: <20241104105830.85612-1-c.ebner@proxmox.com> MIME-Version: 1.0 User-Agent: astroid/0.16.0 (https://github.com/astroidmail/astroid) Message-Id: <1730722421.eutmwxhuvw.astroid@yuna.none> X-SPAM-LEVEL: Spam detection results: 0 AWL 0.048 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pbs-devel] partially-applied: [PATCH proxmox-backup 1/3] sync: fix premature return in snapshot skip filter logic X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Backup Server development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pbs-devel-bounces@lists.proxmox.com Sender: "pbs-devel" applied this one! On November 4, 2024 11:58 am, Christian Ebner wrote: > While checking which snapshots to sync, the filter logic incorrectly > included the first snapshot newer that the last synced one > unconditionally, bypassing the transfer last check for that one > snapshot. Following snapshots are correctly handled again. > > E.g. of an incorrect sync by excerpt of a task log provided by a user > in the community forum [0], with transfer last set to 1: > > ``` > skipped: 2 snapshot(s) (2024-09-29T18:00:28Z .. 2024-10-20T18:00:29Z) - older than the newest local snapshot > skipped: 5 snapshot(s) (2024-10-28T19:00:28Z .. 2024-11-01T19:00:32Z) - due to transfer-last > sync snapshot vm/110/2024-10-27T19:00:25Z > ... > sync snapshot vm/110/2024-11-02T19:00:23Z > ``` > > Not only the last, but the first newer than newest and last were > incorrectly synced. > > By dropping the early return, leading to incorrect inclusion of the > snapshot, the transfer last condition is now correctly checked as > well. > > Link to the issue reported in the community forum: > [0] https://forum.proxmox.com/threads/156873/ > > Signed-off-by: Christian Ebner > --- > src/server/pull.rs | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/src/server/pull.rs b/src/server/pull.rs > index 3117f7d2c..cc1427196 100644 > --- a/src/server/pull.rs > +++ b/src/server/pull.rs > @@ -534,7 +534,6 @@ async fn pull_group( > } else if already_synced_skip_info.count > 0 { > info!("{already_synced_skip_info}"); > already_synced_skip_info.reset(); > - return true; > } > > if pos < cutoff && last_sync_time != dir.time { > -- > 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