This is an automated email from the ASF dual-hosted git repository.

dataroaring pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new a10a959a52f [improve](cache) optimize the cache log (#35603)
a10a959a52f is described below

commit a10a959a52f1c1b7398325c516b6ce553bccaa23
Author: Lightman <[email protected]>
AuthorDate: Wed Jun 5 08:43:56 2024 +0800

    [improve](cache) optimize the cache log (#35603)
    
    The file cache prints too many logs in _disk_resource_limit_mode. Need
    to reduce printing frequency.
---
 be/src/io/cache/block_file_cache.cpp | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/be/src/io/cache/block_file_cache.cpp 
b/be/src/io/cache/block_file_cache.cpp
index 1b9d8b3f23c..05bbaa69adc 100644
--- a/be/src/io/cache/block_file_cache.cpp
+++ b/be/src/io/cache/block_file_cache.cpp
@@ -1417,8 +1417,6 @@ void BlockFileCache::check_disk_resource_limit(const 
std::string& path) {
     }
     if (capacity_percentage >= 
config::file_cache_enter_disk_resource_limit_mode_percent ||
         inode_is_insufficient(inode_percentage)) {
-        LOG(WARNING) << capacity_percentage << " "
-                     << 
config::file_cache_enter_disk_resource_limit_mode_percent;
         _disk_resource_limit_mode = true;
     } else if (_disk_resource_limit_mode &&
                (capacity_percentage < 
config::file_cache_exit_disk_resource_limit_mode_percent) &&
@@ -1426,11 +1424,12 @@ void BlockFileCache::check_disk_resource_limit(const 
std::string& path) {
         _disk_resource_limit_mode = false;
     }
     if (_disk_resource_limit_mode) {
-        LOG_WARNING("file cache background thread")
-                .tag("space percent", capacity_percentage)
-                .tag("inode percent", inode_percentage)
-                .tag("is inode insufficient", 
inode_is_insufficient(inode_percentage))
-                .tag("mode", "run in resource limit");
+        // log per mins
+        LOG_EVERY_N(WARNING, 3) << "file cache background thread space 
percent="
+                                << capacity_percentage << " inode percent=" << 
inode_percentage
+                                << " is inode insufficient="
+                                << inode_is_insufficient(inode_percentage)
+                                << " mode run in resource limit";
     }
 }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to