mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-21 12:13:55 +09:00
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 <aleksei.artamonov@aenix.io>
This commit is contained in:
1 parent
3334152da7
commit
d57ebbe808
2 files changed
+6
-2
No files matched your search
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user