mirror of
https://github.com/minio/minio.git
synced 2025-11-08 21:24:55 -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:
@@ -356,10 +356,10 @@ func testStorageAPIDeleteFile(t *testing.T, storage StorageAPI) {
|
||||
expectErr bool
|
||||
}{
|
||||
{"foo", "myobject", false},
|
||||
// should removed by above case.
|
||||
{"foo", "myobject", true},
|
||||
// file not found error
|
||||
{"foo", "yourobject", true},
|
||||
// file not found not returned
|
||||
{"foo", "myobject", false},
|
||||
// file not found not returned
|
||||
{"foo", "yourobject", false},
|
||||
}
|
||||
|
||||
for i, testCase := range testCases {
|
||||
|
||||
Reference in New Issue
Block a user