cambyzju commented on code in PR #12897:
URL: https://github.com/apache/doris/pull/12897#discussion_r978244404


##########
be/src/io/cache/file_cache_manager.h:
##########
@@ -47,10 +50,20 @@ class FileCacheManager {
 
     bool exist(const std::string& cache_path);
 
+    void add_used_file_size(int64_t s) {
+        _total_used_file_size.fetch_add(s);
+    }
+    // TODO: need call sub while clean
+    void sub_used_file_size(int64_t s) {
+        _total_used_file_size.fetch_sub(s);
+    }
+
 private:
     std::shared_mutex _cache_map_lock;
     // cache_path -> FileCache
     std::map<std::string, FileCachePtr> _file_cache_map;
+
+    std::atomic<int64_t> _total_used_file_size;

Review Comment:
   TODO: _cache_file_cleaner_tasks_producer_callback 计算



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

Reply via email to