mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
fix: deleting objects was not working after upgrades (#13242)
DeleteObject() on existing objects before `xl.json` to `xl.meta` change were not working, not sure when this regression was added. This PR fixes this properly. Also this PR ensures that we perform rename of xl.json to xl.meta only during "write" phase of the call i.e either during Healing or PutObject() overwrites. Also handles few other scenarios during migration where `backendEncryptedFile` was missing deleteConfig() will fail with `configNotFound` this case was not ignored, which can lead to failure during upgrades.
This commit is contained in:
@@ -57,7 +57,9 @@ type objectDeleter interface {
|
||||
}
|
||||
|
||||
func deleteConfig(ctx context.Context, objAPI objectDeleter, configFile string) error {
|
||||
_, err := objAPI.DeleteObject(ctx, minioMetaBucket, configFile, ObjectOptions{})
|
||||
_, err := objAPI.DeleteObject(ctx, minioMetaBucket, configFile, ObjectOptions{
|
||||
DeletePrefix: true,
|
||||
})
|
||||
if err != nil && isErrObjectNotFound(err) {
|
||||
return errConfigNotFound
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user