github-actions[bot] commented on code in PR #63376:
URL: https://github.com/apache/doris/pull/63376#discussion_r3300688476


##########
be/src/common/config.cpp:
##########
@@ -1193,6 +1193,8 @@ DEFINE_Bool(enable_file_cache, "false");
 // Both will use the directory "memory" on the disk instead of the real RAM.
 DEFINE_String(file_cache_path, "[{\"path\":\"${DORIS_HOME}/file_cache\"}]");
 DEFINE_Int64(file_cache_each_block_size, "1048576"); // 1MB
+DEFINE_mBool(enable_external_file_meta_disk_cache, "false");
+DEFINE_mInt64(external_file_meta_disk_cache_max_entry_bytes, "67108864"); // 
64MB
 

Review Comment:
   `enable_external_file_meta_disk_cache` is declared mutable, but enabling it 
after startup does not actually enable the disk cache in the common default 
configuration. `ExecEnv::init_file_cache_factory()` still returns at startup 
when both `enable_file_cache` and this flag are false, so no `FileCacheFactory` 
instances are created. If an operator later sets this mutable flag to true, 
`FileMetaCache::should_enable_for_reader()` starts routing readers through the 
cache path, but `get_block_file_cache()` returns `nullptr` and every persistent 
lookup/insert silently becomes a miss/no-op. Either make this startup-only 
(`DEFINE_Bool`) or ensure the backing file-cache factory is initialized before 
a dynamic enable can take effect.



-- 
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