yiguolei commented on code in PR #24029: URL: https://github.com/apache/doris/pull/24029#discussion_r1318349113
########## be/src/runtime/exec_env.h: ########## @@ -302,4 +341,43 @@ ExecEnv::get_client_cache<TPaloBrokerServiceClient>() { return _broker_client_cache; } +inline TabletSchemaCache& GetGlobalTabletSchemaCache() { + return ExecEnv::GetInstance()->get_tablet_schema_cache_ref(); +} + +inline StorageEngine& GetGlobalStorageEngine() { + return ExecEnv::GetInstance()->get_storage_engine_ref(); Review Comment: 不要这么写,直接返回指针吧 ########## be/src/runtime/exec_env.h: ########## @@ -302,4 +341,43 @@ ExecEnv::get_client_cache<TPaloBrokerServiceClient>() { return _broker_client_cache; } +inline TabletSchemaCache& GetGlobalTabletSchemaCache() { + return ExecEnv::GetInstance()->get_tablet_schema_cache_ref(); +} + +inline StorageEngine& GetGlobalStorageEngine() { + return ExecEnv::GetInstance()->get_storage_engine_ref(); Review Comment: 不要这么写,直接返回指针吧 -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org