all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH proxmox-backup] garbage collection: allow to abort or shutdown on phase 2 for s3 stores
@ 2025-11-28 15:41 Christian Ebner
  0 siblings, 0 replies; only message in thread
From: Christian Ebner @ 2025-11-28 15:41 UTC (permalink / raw)
  To: pbs-devel

Currently only phase 1 and phase 3 can be aborted on s3 backed
datastores.

Safely abort phase 2 after each processed s3 object key. Doing that
after each key is possible since the chunk is already cleaned up from
the local datastore cache after each iteration. While it might not
have been cleaned up from the s3 backend, this leaves it in the same
state as if after a datastore re-creation from previous S3 contents,
where the local marker is also not present. So either the chunk will
be cleaned up by the subsequent garbage collection run or overwritten
by reupload and marker file re-insertion if a concurrent backup
writer adds it again in the meantime.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
---
Noted that it currently cannot be aborted while working on a status
progress for phase 2 as well.

 pbs-datastore/src/datastore.rs | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/pbs-datastore/src/datastore.rs b/pbs-datastore/src/datastore.rs
index 36550ff63..72999be56 100644
--- a/pbs-datastore/src/datastore.rs
+++ b/pbs-datastore/src/datastore.rs
@@ -1740,6 +1740,8 @@ impl DataStore {
 
             loop {
                 for content in list_bucket_result.contents {
+                    worker.check_abort()?;
+                    worker.fail_on_shutdown()?;
                     let (chunk_path, digest, bad) =
                         match self.chunk_path_from_object_key(&content.key) {
                             Some(path) => path,
-- 
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] only message in thread

only message in thread, other threads:[~2025-11-28 15:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-28 15:41 [pbs-devel] [PATCH proxmox-backup] garbage collection: allow to abort or shutdown on phase 2 for s3 stores Christian Ebner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal