Skip to content

Commit

Permalink
[fix]curvefs/client: diskcache may deadlock
Browse files Browse the repository at this point in the history
Signed-off-by: Cyber-SiKu <[email protected]>
  • Loading branch information
Cyber-SiKu committed Nov 10, 2023
1 parent 80a9716 commit 5fd2358
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions curvefs/src/client/s3/disk_cache_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,10 @@ void DiskCacheManager::TrimCache() {
InitQosParam();
if (!IsDiskCacheSafe(kRatioLevel)) {
while (!IsDiskCacheSafe(FLAGS_diskTrimRatio)) {
if (!isRunning_) {
LOG(INFO) << "trim thread end.";
return;
}
UpdateDiskFsUsedRatio();
if (!cachedObjName_->GetBack(&cacheKey)) {
VLOG_EVERY_N(9, 1000) << "obj is empty";
Expand Down

0 comments on commit 5fd2358

Please sign in to comment.