* [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
2025-12-10 11:12 ` [pbs-devel] applied: " Fabian Grünbichler
0 siblings, 1 reply; 2+ messages 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] 2+ messages in thread
* [pbs-devel] applied: [PATCH proxmox-backup] garbage collection: allow to abort or shutdown on phase 2 for s3 stores
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
@ 2025-12-10 11:12 ` Fabian Grünbichler
0 siblings, 0 replies; 2+ messages in thread
From: Fabian Grünbichler @ 2025-12-10 11:12 UTC (permalink / raw)
To: pbs-devel, Christian Ebner
On Fri, 28 Nov 2025 16:41:21 +0100, Christian Ebner wrote:
> 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.
>
> [...]
Applied, thanks!
[1/1] garbage collection: allow to abort or shutdown on phase 2 for s3 stores
commit: 5e3f7e26a70d13f801d50cd968bff9da2d2ef54f
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:11 UTC | newest]
Thread overview: 2+ messages (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
2025-12-10 11:12 ` [pbs-devel] applied: " Fabian Grünbichler
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.