diff --git a/curvefs/src/client/s3/disk_cache_manager.cpp b/curvefs/src/client/s3/disk_cache_manager.cpp index 235989ca87..33a09e307d 100644 --- a/curvefs/src/client/s3/disk_cache_manager.cpp +++ b/curvefs/src/client/s3/disk_cache_manager.cpp @@ -418,6 +418,7 @@ void DiskCacheManager::TrimCache() { cacheWriteFullDir = GetCacheWriteFullDir(); while (true) { UpdateDiskFsUsedRatio(); + waitIntervalSec_.Init(FLAGS_diskTrimCheckIntervalSec * 1000); waitIntervalSec_.WaitForNextExcution(); if (!isRunning_) { LOG(INFO) << "trim thread end.";