imay commented on a change in pull request #2782: Add file cache for v2 URL: https://github.com/apache/incubator-doris/pull/2782#discussion_r368278763
########## File path: be/src/env/env.h ########## @@ -73,6 +76,9 @@ class Env { const std::string& fname, std::unique_ptr<RandomAccessFile>* result) = 0; + virtual Status new_random_access_file(const std::string& fname, Review comment: I think this function is not necessary, the above function can achieve your purpose. ``` std::unique_ptr<RandomAccessFile> file; new_random_access_file(opts, fname, &file); std::shared_ptr<RandomAccessFile> shared_file(file.release()); ``` And this is not a good way to make file cache in this env. Need to let the caller decide whether to 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org