freemandealer commented on code in PR #46561:
URL: https://github.com/apache/doris/pull/46561#discussion_r1923048659


##########
be/src/io/cache/block_file_cache.cpp:
##########
@@ -1789,9 +1718,41 @@ void BlockFileCache::run_background_operation() {
                 if (cur_time < begin->first) {
                     break;
                 }
-                remove_if_ttl_file_unlock(begin->second, false, cache_lock);
+                remove_if_ttl_file_blocks(begin->second, false, cache_lock, 
false);
+            }
+        }
+    }
+}
+
+void BlockFileCache::run_background_gc() {
+    FileCacheKey key;
+    static const size_t interval_ms = 100;
+    const size_t batch_limit = config::file_cache_remove_block_qps_limit * 
interval_ms / 1000;

Review Comment:
   should move into while loop to be dynamically configurable
   interval_ms set to 1m



##########
be/src/io/cache/block_file_cache.cpp:
##########
@@ -1789,9 +1718,41 @@ void BlockFileCache::run_background_operation() {
                 if (cur_time < begin->first) {
                     break;
                 }
-                remove_if_ttl_file_unlock(begin->second, false, cache_lock);
+                remove_if_ttl_file_blocks(begin->second, false, cache_lock, 
false);
+            }
+        }
+    }
+}
+
+void BlockFileCache::run_background_gc() {
+    FileCacheKey key;
+    static const size_t interval_ms = 100;
+    const size_t batch_limit = config::file_cache_remove_block_qps_limit * 
interval_ms / 1000;

Review Comment:
   should move into while loop to be dynamically configurable
   interval_ms set to 1ms



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