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 2FDF71FF15F for ; Mon, 4 Nov 2024 11:59:07 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 0E9A3A5AF; Mon, 4 Nov 2024 11:59:16 +0100 (CET) From: Christian Ebner To: pbs-devel@lists.proxmox.com Date: Mon, 4 Nov 2024 11:58:29 +0100 Message-Id: <20241104105830.85612-2-c.ebner@proxmox.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241104105830.85612-1-c.ebner@proxmox.com> References: <20241104105830.85612-1-c.ebner@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.030 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] [PATCH proxmox-backup 2/3] sync: pull: do not resync currently newest snapshot on target 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" The currently newest snapshot of a group on the sync target is not excluded from the list of already synced snapshots, leading to a re-sync. Filter out the snapshot as well. Signed-off-by: Christian Ebner --- Might be ignored if the re-sync is intetional. Implementation already present since commit: de8ec041 ("src/api2/sync.rs: implement remote sync") src/server/pull.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/pull.rs b/src/server/pull.rs index cc1427196..7aa191d96 100644 --- a/src/server/pull.rs +++ b/src/server/pull.rs @@ -528,7 +528,7 @@ async fn pull_group( .enumerate() .filter(|&(pos, ref dir)| { source_snapshots.insert(dir.time); - if last_sync_time > dir.time { + if last_sync_time >= dir.time { already_synced_skip_info.update(dir.time); return false; } else if already_synced_skip_info.count > 0 { @@ -536,7 +536,7 @@ async fn pull_group( already_synced_skip_info.reset(); } - if pos < cutoff && last_sync_time != dir.time { + if pos < cutoff { transfer_last_skip_info.update(dir.time); return false; } else if transfer_last_skip_info.count > 0 { -- 2.39.5 _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel