* [pbs-devel] [PATCH proxmox-backup] datastore: s3: use owner from local store cache instead of refetching
@ 2025-12-03 15:33 Christian Ebner
2025-12-10 11:09 ` Fabian Grünbichler
0 siblings, 1 reply; 2+ messages in thread
From: Christian Ebner @ 2025-12-03 15:33 UTC (permalink / raw)
To: pbs-devel
Currently the owner file is fetched from the s3 backend for each
backup group. This will however significantly increase the time
needed for listing backup contents and cause additional requests
which can be avoided. Simply use the local owner file instead.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
---
This was reported in an enterprise support ticket.
pbs-datastore/src/datastore.rs | 15 ---------------
1 file changed, 15 deletions(-)
diff --git a/pbs-datastore/src/datastore.rs b/pbs-datastore/src/datastore.rs
index 36550ff63..9d36307ef 100644
--- a/pbs-datastore/src/datastore.rs
+++ b/pbs-datastore/src/datastore.rs
@@ -967,21 +967,6 @@ impl DataStore {
backup_group: &pbs_api_types::BackupGroup,
) -> Result<Authid, Error> {
let full_path = self.owner_path(ns, backup_group);
-
- if let DatastoreBackend::S3(s3_client) = self.backend()? {
- let mut path = ns.path();
- path.push(backup_group.to_string());
- let object_key = crate::s3::object_key_from_path(&path, GROUP_OWNER_FILE_NAME)
- .context("invalid owner file object key")?;
- let response = proxmox_async::runtime::block_on(s3_client.get_object(object_key))?
- .ok_or_else(|| format_err!("fetching owner failed"))?;
- let content = proxmox_async::runtime::block_on(response.content.collect())?;
- let owner = String::from_utf8(content.to_bytes().trim_ascii_end().to_vec())?;
- return owner
- .parse()
- .map_err(|err| format_err!("parsing owner for {backup_group} failed: {err}"));
- }
-
let owner = proxmox_sys::fs::file_read_firstline(full_path)?;
owner
.trim_end() // remove trailing newline
--
2.47.3
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [pbs-devel] [PATCH proxmox-backup] datastore: s3: use owner from local store cache instead of refetching
2025-12-03 15:33 [pbs-devel] [PATCH proxmox-backup] datastore: s3: use owner from local store cache instead of refetching Christian Ebner
@ 2025-12-10 11:09 ` Fabian Grünbichler
0 siblings, 0 replies; 2+ messages in thread
From: Fabian Grünbichler @ 2025-12-10 11:09 UTC (permalink / raw)
To: pbs-devel, Christian Ebner
On Wed, 03 Dec 2025 16:33:10 +0100, Christian Ebner wrote:
> Currently the owner file is fetched from the s3 backend for each
> backup group. This will however significantly increase the time
> needed for listing backup contents and cause additional requests
> which can be avoided. Simply use the local owner file instead.
>
>
Applied, thanks!
[1/1] datastore: s3: use owner from local store cache instead of refetching
commit: 4aecc35e7fe922f93f38d789d671d744fa4c7dd2
Best regards,
--
Fabian Grünbichler <f.gruenbichler@proxmox.com>
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-12-10 11:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-03 15:33 [pbs-devel] [PATCH proxmox-backup] datastore: s3: use owner from local store cache instead of refetching Christian Ebner
2025-12-10 11:09 ` 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