This is an automated email from the ASF dual-hosted git repository.

kxiao pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git

commit 4bb7fbf25852d6b5e247f12426ee4e6ae783d7df
Author: lihangyu <[email protected]>
AuthorDate: Thu Sep 21 15:57:11 2023 +0800

    [improve](tablet schema) add config to modify tablet schema recycle 
interval (#24602)
---
 be/src/common/config.cpp            |  9 +++++++++
 be/src/common/config.h              | 14 ++++++++++++++
 be/src/olap/tablet_schema_cache.cpp |  5 ++---
 3 files changed, 25 insertions(+), 3 deletions(-)

diff --git a/be/src/common/config.cpp b/be/src/common/config.cpp
index 976409c758..e17628ec6e 100644
--- a/be/src/common/config.cpp
+++ b/be/src/common/config.cpp
@@ -1069,6 +1069,15 @@ DEFINE_mString(user_files_secure_path, "${DORIS_HOME}");
 
 DEFINE_Int16(bitmap_serialize_version, "1");
 
+// the count of thread to group commit insert
+DEFINE_Int32(group_commit_insert_threads, "10");
+
+DEFINE_mInt32(scan_thread_nice_value, "0");
+DEFINE_mInt32(tablet_schema_cache_recycle_interval, "86400");
+
+DEFINE_Bool(exit_on_exception, "false")
+
+// clang-format off
 #ifdef BE_TEST
 // test s3
 DEFINE_String(test_s3_resource, "resource");
diff --git a/be/src/common/config.h b/be/src/common/config.h
index dbf6734aa6..14c58fec10 100644
--- a/be/src/common/config.h
+++ b/be/src/common/config.h
@@ -1122,6 +1122,20 @@ DECLARE_mString(user_files_secure_path);
 // BitmapValue serialize version.
 DECLARE_Int16(bitmap_serialize_version);
 
+// This config can be set to limit thread number in group commit insert thread 
pool.
+DECLARE_mInt32(group_commit_insert_threads);
+
+// The configuration item is used to lower the priority of the scanner thread,
+// typically employed to ensure CPU scheduling for write operations.
+// Default is 0, which is default value of thread nice value, increase this 
value
+// to lower the priority of scan threads
+DECLARE_Int32(scan_thread_nice_value);
+// Used to modify the recycle interval of tablet schema cache
+DECLARE_mInt32(tablet_schema_cache_recycle_interval);
+
+// Use `LOG(FATAL)` to replace `throw` when true
+DECLARE_mBool(exit_on_exception);
+
 #ifdef BE_TEST
 // test s3
 DECLARE_String(test_s3_resource);
diff --git a/be/src/olap/tablet_schema_cache.cpp 
b/be/src/olap/tablet_schema_cache.cpp
index e14c3f7ecc..1cff612ac9 100644
--- a/be/src/olap/tablet_schema_cache.cpp
+++ b/be/src/olap/tablet_schema_cache.cpp
@@ -48,16 +48,15 @@ void TabletSchemaCache::stop() {
  * @brief recycle when TabletSchemaSPtr use_count equals 1.
  */
 void TabletSchemaCache::_recycle() {
-    int64_t tablet_schema_cache_recycle_interval = 86400; // s, one day
     int64_t check_interval = 5;
-    int64_t left_second = tablet_schema_cache_recycle_interval;
+    int64_t left_second = config::tablet_schema_cache_recycle_interval;
     while (!_should_stop) {
         if (left_second > 0) {
             std::this_thread::sleep_for(std::chrono::seconds(check_interval));
             left_second -= check_interval;
             continue;
         } else {
-            left_second = tablet_schema_cache_recycle_interval;
+            left_second = config::tablet_schema_cache_recycle_interval;
         }
 
         std::lock_guard guard(_mtx);


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to