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 D7CA71FF13C for ; Thu, 05 Mar 2026 10:52:44 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 9AD94660; Thu, 5 Mar 2026 10:53:49 +0100 (CET) Date: Thu, 05 Mar 2026 10:53:42 +0100 From: Fabian =?iso-8859-1?q?Gr=FCnbichler?= Subject: Re: [PATCH proxmox-backup v2] datastore: don't skip empty namespaces on s3 refresh To: Hannes Laimer , pbs-devel@lists.proxmox.com References: <20260305092032.29058-1-h.laimer@proxmox.com> In-Reply-To: MIME-Version: 1.0 User-Agent: astroid/0.17.0 (https://github.com/astroidmail/astroid) Message-Id: <1772704411.5tdvmo2ygm.astroid@yuna.none> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1772704398815 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.051 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 SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: DE3H4LINXHYAYWEZSBXIISXVDZVOJTWX X-Message-ID-Hash: DE3H4LINXHYAYWEZSBXIISXVDZVOJTWX X-MailFrom: f.gruenbichler@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Backup Server development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On March 5, 2026 10:32 am, Hannes Laimer wrote: >=20 >=20 > On 2026-03-05 10:20, Hannes Laimer wrote: >> Without this empty namespaces present on s3 won't be visible locally. >>=20 >> Signed-off-by: Hannes Laimer >> --- >> v2, thanks @Fabian: >> - don't duplicate dir creation, just move ns check to after dir >> creation since it is identicaly for namespaces and other things >>=20 >> pbs-datastore/src/datastore.rs | 12 +++++++----- >> 1 file changed, 7 insertions(+), 5 deletions(-) >>=20 >> diff --git a/pbs-datastore/src/datastore.rs b/pbs-datastore/src/datastor= e.rs >> index 7ad3d917..76b66f7d 100644 >> --- a/pbs-datastore/src/datastore.rs >> +++ b/pbs-datastore/src/datastore.rs >> @@ -2534,11 +2534,6 @@ impl DataStore { >> let object_path =3D object_path.strip_prefix(&store_pre= fix).with_context(|| { >> format!("failed to strip store context prefix {stor= e_prefix} for {object_key}") >> })?; >> - if object_path.ends_with(NAMESPACE_MARKER_FILENAME) { >> - continue; >> - } >> - >> - info!("Fetching object {object_path}"); >> =20 >> let file_path =3D tmp_base.join(object_path); >> if let Some(parent) =3D file_path.parent() { >> @@ -2549,6 +2544,13 @@ impl DataStore { >> )?; >> } >> =20 >> + if object_path.ends_with(NAMESPACE_MARKER_FILENAME) { >> + info!("Created namespace {object_path}"); >> + continue; >> + } else { > ^^ > not wrong technically, but doesn't make much sense... :P > sorry for the noise added that as follow-up. >=20 >> + info!("Fetching object {object_path}"); >> + } >> + >> let mut target_file =3D tokio::fs::OpenOptions::new() >> .write(true) >> .create(true) >=20 >=20 >=20 >=20 >=20 >=20