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:
1. should move into while loop to be dynamically configurable
2. interval_ms set to interval_us = 1000us
const size_t batch_limit =
std::max(config::file_cache_remove_block_qps_limit * (interval_us / 1000000.0),
1);
3. single thread IO bottleneck
4. corner cases: upper bound and lower bound
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]