Clean entire tmp-old on restart (#15979)

This commit is contained in:
Klaus Post
2022-10-31 15:27:50 +01:00
committed by GitHub
parent b57fbff7c1
commit ecc932d5dd
7 changed files with 19 additions and 42 deletions
+3 -2
View File
@@ -97,7 +97,8 @@ func bgFormatErasureCleanupTmp(diskPath string) {
err))
}
go removeAll(tmpOld)
// Remove the entire folder in case there are leftovers that didn't get cleaned up before restart.
go removeAll(pathJoin(diskPath, minioMetaTmpBucket+"-old"))
// Renames and schedules for purging all bucket metacache.
go renameAllBucketMetacache(diskPath)
}
@@ -146,7 +147,7 @@ func isServerResolvable(endpoint Endpoint, timeout time.Duration) error {
// time. additionally make sure to close all the disks used in this attempt.
func connectLoadInitFormats(verboseLogging bool, firstDisk bool, endpoints Endpoints, poolCount, setCount, setDriveCount int, deploymentID, distributionAlgo string) (storageDisks []StorageAPI, format *formatErasureV3, err error) {
// Initialize all storage disks
storageDisks, errs := initStorageDisksWithErrors(endpoints)
storageDisks, errs := initStorageDisksWithErrors(endpoints, true)
defer func(storageDisks []StorageAPI) {
if err != nil {