zhiqiang-hhhh commented on code in PR #24029:
URL: https://github.com/apache/doris/pull/24029#discussion_r1320918632


##########
be/src/runtime/exec_env_init.cpp:
##########
@@ -286,8 +368,8 @@ Status ExecEnv::_init_mem_env() {
     while (!is_percent && pk_storage_page_cache_limit > MemInfo::mem_limit() / 
2) {
         pk_storage_page_cache_limit = storage_cache_limit / 2;
     }
-    StoragePageCache::create_global_cache(storage_cache_limit, 
index_percentage,
-                                          pk_storage_page_cache_limit, 
num_shards);
+    _storage_page_cache = StoragePageCache::create_global_cache(
+            storage_cache_limit, index_percentage, 
pk_storage_page_cache_limit, num_shards);

Review Comment:
   > Why generate a raw pointer to return ExecEnv Instead of `make_unique` here 
a `StoragePageCache` unique_ptr
   
   a complete refactor should add a exec_env_internal, which uses unique_ptr 
instead of raw ptr.



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