xl: remove cleanupDir instead use Delete() (#11880)

use a single call to remove directly at disk
instead of doing recursively at network layer.
This commit is contained in:
Harshavardhana
2021-03-24 09:08:05 -07:00
committed by GitHub
parent fad7b27f15
commit 75741dbf4a
4 changed files with 54 additions and 103 deletions

View File

@@ -881,7 +881,7 @@ func (er erasureObjects) deleteObject(ctx context.Context, bucket, object string
if disks[index] == nil {
return errDiskNotFound
}
return cleanupDir(ctx, disks[index], minioMetaTmpBucket, tmpObj)
return disks[index].Delete(ctx, minioMetaTmpBucket, tmpObj, true)
}, index)
}