freemandealer commented on code in PR #63504:
URL: https://github.com/apache/doris/pull/63504#discussion_r3339831039
##########
be/src/io/cache/block_file_cache.cpp:
##########
@@ -2314,19 +2406,28 @@ void BlockFileCache::update_ttl_atime(const
UInt128Wrapper& hash) {
void BlockFileCache::run_background_lru_log_replay() {
Thread::set_self_name("run_background_lru_log_replay");
while (!_close) {
- int64_t interval_ms =
config::file_cache_background_lru_log_replay_interval_ms;
+ size_t backlog = _lru_recorder->get_total_lru_log_queue_size();
+ QueueConsumePlan plan = build_lru_log_replay_plan(backlog);
{
std::unique_lock close_lock(_close_mtx);
- _close_cv.wait_for(close_lock,
std::chrono::milliseconds(interval_ms));
+ _close_cv.wait_for(close_lock,
std::chrono::milliseconds(plan.interval_ms));
if (_close) {
break;
}
Review Comment:
reasonable. will do.
--
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]