From d57ebbe808e831637062a920ba9f12fd5580a541 Mon Sep 17 00:00:00 2001 From: Alexey Artamonov Date: Wed, 11 Nov 2026 15:09:15 +0300 Subject: [PATCH] docs(backups): state what the MariaDB dump delete does not cover The comment on who deletes a MariaDB Backup listed namespace teardown without saying that teardown can remove the operator Backup first, in which case the dump is left behind with a Warning, so it promised a delete the code does not make. The remover contract claimed a missing key is never an error, which holds only for a backend that answers the delete with 204, the one status minio-go accepts. Assisted-by: LLM Signed-off-by: Alexey Artamonov --- internal/backupcontroller/artifact_size.go | 4 +++- internal/backupcontroller/backup_controller.go | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/internal/backupcontroller/artifact_size.go b/internal/backupcontroller/artifact_size.go index 40d827c62..97a67a729 100644 --- a/internal/backupcontroller/artifact_size.go +++ b/internal/backupcontroller/artifact_size.go @@ -39,7 +39,9 @@ type s3ObjectLister interface { } type s3ObjectRemover interface { - // RemoveObject deletes key; a key that does not exist is not an error. + // RemoveObject deletes key. S3 answers 204 for a key that does not + // exist and minio-go takes 204 as success; a backend answering a + // missing key with any other status makes it an error. RemoveObject(ctx context.Context, bucket, key string) error } diff --git a/internal/backupcontroller/backup_controller.go b/internal/backupcontroller/backup_controller.go index d8c69bf1c..a632f851d 100644 --- a/internal/backupcontroller/backup_controller.go +++ b/internal/backupcontroller/backup_controller.go @@ -142,7 +142,9 @@ func (r *BackupReconciler) cleanupOnDelete(ctx context.Context, backup *backupsv // a dump on the platform bucket is deleted here or never. A dump in // a tenant's own bucket is deleted too: the Backup proves it owns // it, and tenants cannot delete Backups, so the delete comes from an - // administrator or from namespace teardown (see cleanupMariaDBBackup). + // administrator or from namespace teardown. Teardown can remove the + // operator Backup first, and the dump is then left behind with a + // Warning, since its storage is read from it (see cleanupMariaDBBackup). return r.cleanupMariaDBBackup(ctx, backup) case strategyv1alpha1.MongoDBStrategyKind: // Split by flow (see cleanupMongoDBBackup). A legacy backup writes to the