From: Christian Ebner <c.ebner@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup] garbage collection: allow to abort or shutdown on phase 2 for s3 stores
Date: Fri, 28 Nov 2025 16:41:21 +0100 [thread overview]
Message-ID: <20251128154121.688870-1-c.ebner@proxmox.com> (raw)
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
reply other threads:[~2025-11-28 15:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251128154121.688870-1-c.ebner@proxmox.com \
--to=c.ebner@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox