This is an automated email from the ASF dual-hosted git repository. morningman pushed a commit to branch branch-1.2-lts in repository https://gitbox.apache.org/repos/asf/doris.git
commit b3ddb9ce1a7dbcf0542465f4cef4e31342ff354a Author: shee <[email protected]> AuthorDate: Sat Feb 25 09:15:15 2023 +0800 [Enhancement] path scan causes disk io to skyrocket (#16968) --- be/src/common/config.h | 1 + be/src/olap/data_dir.cpp | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/be/src/common/config.h b/be/src/common/config.h index 4bbee85131..95db7aecd8 100644 --- a/be/src/common/config.h +++ b/be/src/common/config.h @@ -599,6 +599,7 @@ CONF_mInt32(path_gc_check_interval_second, "86400"); CONF_mInt32(path_gc_check_step, "1000"); CONF_mInt32(path_gc_check_step_interval_ms, "10"); CONF_mInt32(path_scan_interval_second, "86400"); +CONF_mInt32(path_scan_step_interval_ms, "70"); // The following 2 configs limit the max usage of disk capacity of a data dir. // If both of these 2 threshold reached, no more data can be writen into that data dir. diff --git a/be/src/olap/data_dir.cpp b/be/src/olap/data_dir.cpp index 0b70977721..7da8913843 100644 --- a/be/src/olap/data_dir.cpp +++ b/be/src/olap/data_dir.cpp @@ -676,7 +676,12 @@ void DataDir::perform_path_scan() { << " error[" << ret.to_string() << "]"; continue; } + for (const auto& schema_hash : schema_hashes) { + int32_t interval_ms = config::path_scan_step_interval_ms; + if (interval_ms > 0) { + std::this_thread::sleep_for(std::chrono::milliseconds(interval_ms)); + } auto tablet_schema_hash_path = fmt::format("{}/{}", tablet_id_path, schema_hash); _all_tablet_schemahash_paths.insert(tablet_schema_hash_path); --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
