PXB-3609 : xbcloud delete leaves the .md5 file behind - #1777
Open
satya-bodapati wants to merge 1 commit into
Open
PXB-3609 : xbcloud delete leaves the .md5 file behind#1777satya-bodapati wants to merge 1 commit into
satya-bodapati wants to merge 1 commit into
Conversation
Contributor
Author
satya-bodapati
force-pushed
the
PXB-8.4-3609
branch
from
August 14, 2026 12:41
a976a6c to
cf4d969
Compare
https://perconadev.atlassian.net/browse/PXB-3609 xbcloud put --md5 uploads the checksum file as <backup_name>.md5, next to the backup directory and not inside it. xbcloud delete lists only what is under <backup_name>/, so the .md5 file xbcloud generated was never deleted and stayed in the bucket after the backup itself was gone. Delete <backup_name>.md5 along with the backup. At delete time we do not know whether the backup was taken with --md5, so the delete is unconditional and delete_object() takes a best_effort flag for it: an object that is not there, or that we have no permission on, is not reported as an error. S3 answers 204 for a DELETE of a missing key while Azure and Swift answer 404, and a user whose rights are scoped to <backup_name>/* gets 403 for the .md5 file whether it exists or not. In all of those cases we stay quiet and leave things as they were before this fix. Real errors are still reported, and the backup itself is deleted as usual. We do not check whether the file exists before deleting it, so that delete does not start requiring s3:GetObject - a retention user with only ListBucket and DeleteObject must still be able to remove a backup. Tests: md5_delete, md5_delete_permissions, md5_delete_prefix_scope.
satya-bodapati
force-pushed
the
PXB-8.4-3609
branch
from
August 17, 2026 14:01
cf4d969 to
988a360
Compare
jakub-nowakowski-percona
approved these changes
Aug 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://perconadev.atlassian.net/browse/PXB-3609
xbcloud put --md5 uploads the checksum file as <backup_name>.md5, next to the backup directory and not inside it. xbcloud delete lists only what is under <backup_name>/, so the .md5 file xbcloud generated was never deleted and stayed in the bucket after the backup itself was gone.
Delete <backup_name>.md5 along with the backup.
At delete time we do not know whether the backup was taken with --md5, so the delete is unconditional and delete_object() takes a best_effort flag for it: an object that is not there, or that we have no permission on, is not reported as an error. S3 answers 204 for a DELETE of a missing key while Azure and Swift answer 404, and a user whose rights are scoped to <backup_name>/* gets 403 for the .md5 file whether it exists or not. In all of those cases we stay quiet and leave things as they were before this fix. Real errors are still reported, and the backup itself is deleted as usual.
We do not check whether the file exists before deleting it, so that delete does not start requiring s3:GetObject - a retention user with only ListBucket and DeleteObject must still be able to remove a backup.
Tests: md5_delete, md5_delete_permissions, md5_delete_prefix_scope.