kaka11chen commented on code in PR #33959: URL: https://github.com/apache/doris/pull/33959#discussion_r1574310604
########## be/src/io/hdfs_util.cpp: ########## @@ -103,16 +103,16 @@ void HdfsHandlerCache::_clean_oldest() { } Status HdfsHandlerCache::get_connection(const THdfsParams& hdfs_params, const std::string& fs_name, - HdfsHandler** fs_handle) { + std::shared_ptr<HdfsHandler>* fs_handle) { uint64 hash_code = hdfs_hash_code(hdfs_params); { std::lock_guard<std::mutex> l(_lock); auto it = _cache.find(hash_code); if (it != _cache.end()) { - HdfsHandler* handle = it->second.get(); + std::shared_ptr<HdfsHandler> handle = it->second; if (!handle->invalid()) { handle->inc_ref(); - *fs_handle = handle; + *fs_handle = std::move(handle); Review Comment: It is for fs handle cache. -- 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