This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new 22883e7e08 [fuzzy](test) be fuzzy conf (#14654) 22883e7e08 is described below commit 22883e7e083545efd66762bb6fc6c5a2a590bef1 Author: Dongyang Li <hello_step...@qq.com> AuthorDate: Tue Nov 29 19:38:40 2022 +0800 [fuzzy](test) be fuzzy conf (#14654) --- be/src/common/config.h | 3 +++ be/src/common/configbase.cpp | 19 +++++++++++++++++-- be/src/common/configbase.h | 7 ++++++- be/src/service/doris_main.cpp | 5 +++++ 4 files changed, 31 insertions(+), 3 deletions(-) diff --git a/be/src/common/config.h b/be/src/common/config.h index c3ae42329a..4c256f168b 100644 --- a/be/src/common/config.h +++ b/be/src/common/config.h @@ -861,6 +861,9 @@ CONF_String(jvm_max_heap_size, "1024M"); // enable java udf and jdbc scannode CONF_Bool(enable_java_support, "true"); +// Set config randomly to check more issues in github workflow +CONF_Bool(enable_fuzzy_mode, "false"); + #ifdef BE_TEST // test s3 CONF_String(test_s3_resource, "resource"); diff --git a/be/src/common/configbase.cpp b/be/src/common/configbase.cpp index e06988265f..bbce71e15f 100644 --- a/be/src/common/configbase.cpp +++ b/be/src/common/configbase.cpp @@ -406,13 +406,14 @@ bool persist_config(const std::string& field, const std::string& value) { return tmp_props.dump(conffile); } -Status set_config(const std::string& field, const std::string& value, bool need_persist) { +Status set_config(const std::string& field, const std::string& value, bool need_persist, + bool force) { auto it = Register::_s_field_map->find(field); if (it == Register::_s_field_map->end()) { return Status::NotFound("'{}' is not found", field); } - if (!it->second.valmutable) { + if (!force && !it->second.valmutable) { return Status::NotSupported("'{}' is not support to modify", field); } @@ -432,6 +433,20 @@ Status set_config(const std::string& field, const std::string& value, bool need_ it->second.type); } +Status set_fuzzy_config(const std::string& field, const std::string& value) { + return set_config(field, value, false, true); +} + +void set_fuzzy_configs() { + // random value true or false + Status s = + set_fuzzy_config("disable_storage_page_cache", ((rand() % 2) == 0) ? "true" : "false"); + LOG(INFO) << s.to_string(); + // random value from 8 to 48 + // s = set_fuzzy_config("doris_scanner_thread_pool_thread_num", std::to_string((rand() % 41) + 8)); + // LOG(INFO) << s.to_string(); +} + std::mutex* get_mutable_string_config_lock() { return &mutable_string_config_lock; } diff --git a/be/src/common/configbase.h b/be/src/common/configbase.h index 8e8f13b5c0..f0d9ed7aee 100644 --- a/be/src/common/configbase.h +++ b/be/src/common/configbase.h @@ -174,7 +174,8 @@ extern std::mutex custom_conf_lock; bool init(const char* conf_file, bool fill_conf_map = false, bool must_exist = true, bool set_to_default = true); -Status set_config(const std::string& field, const std::string& value, bool need_persist = false); +Status set_config(const std::string& field, const std::string& value, bool need_persist = false, + bool force = false); bool persist_config(const std::string& field, const std::string& value); @@ -182,5 +183,9 @@ std::mutex* get_mutable_string_config_lock(); std::vector<std::vector<std::string>> get_config_info(); +Status set_fuzzy_config(const std::string& field, const std::string& value); + +void set_fuzzy_configs(); + } // namespace config } // namespace doris diff --git a/be/src/service/doris_main.cpp b/be/src/service/doris_main.cpp index be08539d5a..11460be3ee 100644 --- a/be/src/service/doris_main.cpp +++ b/be/src/service/doris_main.cpp @@ -319,6 +319,11 @@ int main(int argc, char** argv) { return -1; } + if (doris::config::enable_fuzzy_mode) { + LOG(INFO) << "enable_fuzzy_mode is true, set fuzzy configs"; + doris::config::set_fuzzy_configs(); + } + #if !defined(__SANITIZE_ADDRESS__) && !defined(ADDRESS_SANITIZER) && !defined(LEAK_SANITIZER) && \ !defined(THREAD_SANITIZER) && !defined(USE_JEMALLOC) // Change the total TCMalloc thread cache size if necessary. --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org