gavinchou commented on code in PR #55772:
URL: https://github.com/apache/doris/pull/55772#discussion_r2684906254


##########
be/src/io/cache/block_file_cache.cpp:
##########
@@ -420,7 +420,10 @@ BlockFileCache::QueryFileCacheContextPtr 
BlockFileCache::get_or_set_query_contex
         return context;
     }
 
-    auto query_context = 
std::make_shared<QueryFileCacheContext>(_max_query_cache_size);
+    // provide a minimum guaranteed capacity 256MB (or _capacity / 2 if 
smaller)
+    auto query_context = std::make_shared<QueryFileCacheContext>(
+            std::max(_capacity * file_cache_query_limit_percent / 100,

Review Comment:
   这里最好不要加这么多的magic, 有就是有没有就是没有, 如果是异常值就打日志. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to