From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id D09611FF17C for ; Wed, 17 Sep 2025 12:29:55 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 668B22E1; Wed, 17 Sep 2025 12:30:10 +0200 (CEST) From: Christian Ebner To: pbs-devel@lists.proxmox.com Date: Wed, 17 Sep 2025 12:29:57 +0200 Message-ID: <20250917102957.231963-1-c.ebner@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1758104998635 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.043 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 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [pull.rs] Subject: [pbs-devel] [PATCH proxmox] sync: pull: fix regression in resync of corrupt snapshots 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" 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 --- 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