From 9850c3bc85e9e5c9369eccde9984016372ee55fd Mon Sep 17 00:00:00 2001 From: ym0 Date: Thu, 2 Dec 2021 14:33:30 +0800 Subject: [PATCH] Change _schema_history_recycle_interval to a formal parameter --- src/rootserver/ob_root_service.cpp | 4 ++-- src/rootserver/ob_schema_history_recycler.cpp | 6 +++--- src/share/config/ob_server_config.h | 2 +- src/share/parameter/ob_parameter_seed.ipp | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/rootserver/ob_root_service.cpp b/src/rootserver/ob_root_service.cpp index 34a4c3864f..c46e8e6945 100644 --- a/src/rootserver/ob_root_service.cpp +++ b/src/rootserver/ob_root_service.cpp @@ -9790,9 +9790,9 @@ int ObRootService::set_config_post_hook(const obrpc::ObAdminSetConfigArg& arg) LOG_WARN("fail to submit update rs list task", KR(ret), K(tmp_ret)); } LOG_INFO("obconfig_url parameters updated, force submit update rslist task", KR(tmp_ret), KPC(item)); - } else if (0 == STRCMP(item->name_.ptr(), _SCHEMA_HISTORY_RECYCLE_INTERVAL)) { + } else if (0 == STRCMP(item->name_.ptr(), SCHEMA_HISTORY_RECYCLE_INTERVAL)) { schema_history_recycler_.wakeup(); - LOG_INFO("_schema_history_recycle_interval parameters updated, wakeup schema_history_recycler", KPC(item)); + LOG_INFO("schema_history_recycle_interval parameters updated, wakeup schema_history_recycler", KPC(item)); } } return ret; diff --git a/src/rootserver/ob_schema_history_recycler.cpp b/src/rootserver/ob_schema_history_recycler.cpp index cb214de5d9..6813d23c1f 100644 --- a/src/rootserver/ob_schema_history_recycler.cpp +++ b/src/rootserver/ob_schema_history_recycler.cpp @@ -68,8 +68,8 @@ bool ObRecycleSchemaValue::is_valid() const int64_t ObSchemaHistoryRecyclerIdling::get_idle_interval_us() { int64_t idle_time = DEFAULT_SCHEMA_HISTORY_RECYCLE_INTERVAL; - if (0 != GCONF._schema_history_recycle_interval && !GCONF.in_upgrade_mode()) { - idle_time = GCONF._schema_history_recycle_interval; + if (0 != GCONF.schema_history_recycle_interval && !GCONF.in_upgrade_mode()) { + idle_time = GCONF.schema_history_recycle_interval; } return idle_time; } @@ -159,7 +159,7 @@ int ObSchemaHistoryRecycler::check_inner_stat() } else if (stop_) { ret = OB_CANCELED; LOG_WARN("schema history recycler stopped", KR(ret)); - } else if (0 == GCONF._schema_history_recycle_interval || GCONF.in_upgrade_mode() || !GCTX.is_schema_splited()) { + } else if (0 == GCONF.schema_history_recycle_interval || GCONF.in_upgrade_mode() || !GCTX.is_schema_splited()) { ret = OB_CANCELED; LOG_WARN("schema history recycler should stopped", KR(ret)); } diff --git a/src/share/config/ob_server_config.h b/src/share/config/ob_server_config.h index 272785d19d..370aa26c00 100644 --- a/src/share/config/ob_server_config.h +++ b/src/share/config/ob_server_config.h @@ -42,7 +42,7 @@ const char* const ENABLE_SQL_AUDIT = "enable_sql_audit"; const char* const CONFIG_TRUE_VALUE = "1"; const char* const CONFIG_FALSE_VALUE = "0"; const char* const OBCONFIG_URL = "obconfig_url"; -const char* const _SCHEMA_HISTORY_RECYCLE_INTERVAL = "_schema_history_recycle_interval"; +const char* const SCHEMA_HISTORY_RECYCLE_INTERVAL = "schema_history_recycle_interval"; const char* const _RECYCLEBIN_OBJECT_PURGE_FREQUENCY = "_recyclebin_object_purge_frequency"; const char* const TDE_MODE = "tde_mode"; const char* const EXTERNAL_KMS_INFO = "external_kms_info"; diff --git a/src/share/parameter/ob_parameter_seed.ipp b/src/share/parameter/ob_parameter_seed.ipp index 499d87c836..66ebd90611 100644 --- a/src/share/parameter/ob_parameter_seed.ipp +++ b/src/share/parameter/ob_parameter_seed.ipp @@ -1425,7 +1425,7 @@ DEF_BOOL(_enable_plan_cache_mem_diagnosis, OB_CLUSTER_PARAMETER, "False", DEF_INT(_clog_aggregation_buffer_amount, OB_TENANT_PARAMETER, "0", "[0, 128]", "the amount of clog aggregation buffer", ObParameterAttr(Section::OBSERVER, Source::DEFAULT, EditLevel::DYNAMIC_EFFECTIVE)); -DEF_TIME(_schema_history_recycle_interval, OB_CLUSTER_PARAMETER, "0s", "[0s,]", +DEF_TIME(schema_history_recycle_interval, OB_CLUSTER_PARAMETER, "10m", "[0s,]", "the time interval between the schedules of schema history recyle task. " "Range: [0s, +∞)", ObParameterAttr(Section::LOAD_BALANCE, Source::DEFAULT, EditLevel::DYNAMIC_EFFECTIVE)); -- GitLab