gavinchou commented on code in PR #64496:
URL: https://github.com/apache/doris/pull/64496#discussion_r3414704948
##########
be/src/io/cache/block_file_cache.cpp:
##########
@@ -2189,6 +2140,154 @@ void BlockFileCache::run_background_ttl_gc() {
}
}
+size_t BlockFileCache::repair_duplicate_ttl_dirs_once() {
+ if (!config::enable_file_cache_ttl_repair_checker ||
+ _storage->get_type() != FileCacheStorageType::DISK ||
!_async_open_done) {
+ return 0;
+ }
+
+ const int64_t max_scan_prefix_dirs = std::max<int64_t>(
+ 0,
config::file_cache_ttl_repair_checker_max_scan_prefix_dirs_per_round);
+ if (max_scan_prefix_dirs == 0) {
+ return 0;
+ }
+
+ int64_t duration_ns = 0;
+ std::vector<FileCacheDuplicateKeyDirs> duplicate_dirs;
+ size_t next_prefix_index = _ttl_repair_checker_next_prefix_index;
+ size_t scanned_prefix_dirs = 0;
+ {
+ SCOPED_RAW_TIMER(&duration_ns);
+ auto st =
_storage->list_duplicate_key_dirs(_ttl_repair_checker_next_prefix_index,
Review Comment:
how long it may take ? an is there any performance issues?
--
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]