mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
fix: remove parent dirs in RenameData upon failure (#12452)
- it is possible that during I/O failures we might leave partially written directories, make sure we purge them after. - rename current data-dir (null) versionId only after the newer xl.meta has been written fully. - attempt removal once for minioMetaTmpBucket/uuid/ as this folder is empty if all previous operations were successful, this allows avoiding recursive os.Remove()
This commit is contained in:
@@ -966,11 +966,11 @@ func TestXLStorageDeleteFile(t *testing.T) {
|
||||
expectedErr: nil,
|
||||
},
|
||||
// TestXLStorage case - 2.
|
||||
// The file was deleted in the last case, so Delete should fail.
|
||||
// The file was deleted in the last case, so Delete should not fail.
|
||||
{
|
||||
srcVol: "success-vol",
|
||||
srcPath: "success-file",
|
||||
expectedErr: errFileNotFound,
|
||||
expectedErr: nil,
|
||||
},
|
||||
// TestXLStorage case - 3.
|
||||
// TestXLStorage case with segment of the volume name > 255.
|
||||
|
||||
Reference in New Issue
Block a user