Reduce temporary file clean-up waits (#16110)

This commit is contained in:
Klaus Post
2022-11-22 16:23:36 +01:00
committed by GitHub
parent 08103870a5
commit 98ba622679
4 changed files with 17 additions and 16 deletions

View File

@@ -206,7 +206,7 @@ func (er erasureObjects) cleanupStaleUploadsOnDisk(ctx context.Context, disk Sto
er.deleteAll(ctx, minioMetaMultipartBucket, uploadIDPath)
return nil
}
wait := er.deletedCleanupSleeper.Timer(ctx)
wait := deletedCleanupSleeper.Timer(ctx)
if now.Sub(fi.ModTime) > expiry {
er.deleteAll(ctx, minioMetaMultipartBucket, uploadIDPath)
}
@@ -223,7 +223,7 @@ func (er erasureObjects) cleanupStaleUploadsOnDisk(ctx context.Context, disk Sto
if err != nil {
return nil
}
wait := er.deletedCleanupSleeper.Timer(ctx)
wait := deletedCleanupSleeper.Timer(ctx)
if now.Sub(vi.Created) > expiry {
er.deleteAll(ctx, minioMetaTmpBucket, tmpDir)
}