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
+1 -3
View File
@@ -66,8 +66,6 @@ type erasureObjects struct {
// Byte pools used for temporary i/o buffers,
// legacy objects.
bpOld *bpool.BytePoolCap
deletedCleanupSleeper *dynamicSleeper
}
// NewNSLock - initialize a new namespace RWLocker instance.
@@ -338,7 +336,7 @@ func (er erasureObjects) cleanupDeletedObjects(ctx context.Context) {
defer wg.Done()
diskPath := disk.Endpoint().Path
readDirFn(pathJoin(diskPath, minioMetaTmpDeletedBucket), func(ddir string, typ os.FileMode) error {
wait := er.deletedCleanupSleeper.Timer(ctx)
wait := deletedCleanupSleeper.Timer(ctx)
removeAll(pathJoin(diskPath, minioMetaTmpDeletedBucket, ddir))
wait()
return nil