Skip to content

Commit

Permalink
curvefs/client: edit some logs level
Browse files Browse the repository at this point in the history
  • Loading branch information
wuhongsong committed May 7, 2022
1 parent e7a6d67 commit 6769acf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions curvefs/src/client/s3/client_s3_adaptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ int S3ClientAdaptorImpl::Write(uint64_t inodeId, uint64_t offset,
uint64_t size = fsCacheManager_->GetDataCacheSize();
uint64_t maxSize = fsCacheManager_->GetDataCacheMaxSize();
if ((size + pendingReq * fuseMaxSize_) >= maxSize) {
LOG(INFO) << "write cache is full, wait flush. size:" << size
<< ", maxSize:" << maxSize;
VLOG(6) << "write cache is full, wait flush. size: " << size
<< ", maxSize:" << maxSize;
// offer to do flush
waitInterval_.StopWait();
fsCacheManager_->WaitFlush();
Expand All @@ -136,8 +136,8 @@ int S3ClientAdaptorImpl::Write(uint64_t inodeId, uint64_t offset,
if (needSleep) {
uint32_t exponent = pow(2, (exceedRatio) / 10);
bthread_usleep(throttleBaseSleepUs_ * exceedRatio * exponent);
LOG(INFO) << "write cache is nearfull and use ratio is: "
<< memCacheRatio << ", exponent is: " << exponent;
VLOG(6) << "write cache nearfull and use ratio is: "
<< memCacheRatio << ", exponent is: " << exponent;
}
}
int ret = fileCacheManager->Write(offset, length, buf);
Expand Down
4 changes: 2 additions & 2 deletions curvefs/src/client/s3/disk_cache_manager_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ int DiskCacheManagerImpl::WriteDiskFile(const std::string name, const char *buf,
VLOG(9) << "write name = " << name << ", length = " << length;
// if cache disk is full
if (diskCacheManager_->IsDiskCacheFull()) {
VLOG(3) << "write disk file fail, disk full.";
VLOG(6) << "write disk file fail, disk full.";
return -1;
}
// write to cache disk
Expand Down Expand Up @@ -126,7 +126,7 @@ int DiskCacheManagerImpl::WriteDiskFile(const std::string name, const char *buf,
int DiskCacheManagerImpl::WriteReadDirect(const std::string fileName,
const char *buf, uint64_t length) {
if (diskCacheManager_->IsDiskCacheFull()) {
VLOG(3) << "write disk file fail, disk full.";
VLOG(6) << "write disk file fail, disk full.";
return -1;
}
int ret = diskCacheManager_->WriteReadDirect(fileName, buf, length);
Expand Down

0 comments on commit 6769acf

Please sign in to comment.