[CP] Modify lower bound of memory_limit, __easy_memory_limit.
This commit is contained in:
@ -52,6 +52,7 @@ int set_cluster_name_hash(const ObString &cluster_name)
|
||||
LOG_WARN("failed to calc_cluster_name_hash", KR(ret), K(cluster_name));
|
||||
} else {
|
||||
obrpc::ObRpcNetHandler::CLUSTER_NAME_HASH = cluster_name_hash;
|
||||
LOG_INFO("set cluster_name_hash", KR(ret), K(cluster_name), K(cluster_name_hash));
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@ -88,6 +89,7 @@ int ObServerReloadConfig::operator()()
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
int real_ret = ret;
|
||||
const bool is_arbitration_mode = OBSERVER.is_arbitration_mode();
|
||||
|
||||
if (!gctx_.is_inited()) {
|
||||
real_ret = ret = OB_INNER_STAT_ERROR;
|
||||
@ -155,27 +157,30 @@ int ObServerReloadConfig::operator()()
|
||||
ObMallocSampleLimiter::set_interval(GCONF._max_malloc_sample_interval,
|
||||
GCONF._min_malloc_sample_interval);
|
||||
#endif
|
||||
ObIOConfig io_config;
|
||||
int64_t cpu_cnt = GCONF.cpu_count;
|
||||
if (cpu_cnt <= 0) {
|
||||
cpu_cnt = common::get_cpu_num();
|
||||
}
|
||||
io_config.disk_io_thread_count_ = GCONF.disk_io_thread_count;
|
||||
// In the 2.x version, reuse the sys_bkgd_io_timeout configuration item to indicate the data disk io timeout time
|
||||
// After version 3.1, use the data_storage_io_timeout configuration item.
|
||||
io_config.data_storage_io_timeout_ms_ = GCONF._data_storage_io_timeout / 1000L;
|
||||
io_config.data_storage_warning_tolerance_time_ = GCONF.data_storage_warning_tolerance_time;
|
||||
io_config.data_storage_error_tolerance_time_ = GCONF.data_storage_error_tolerance_time;
|
||||
if (OB_FAIL(ObIOManager::get_instance().set_io_config(io_config))) {
|
||||
real_ret = ret;
|
||||
LOG_WARN("reload io manager config fail, ", K(ret));
|
||||
}
|
||||
if (!is_arbitration_mode) {
|
||||
ObIOConfig io_config;
|
||||
int64_t cpu_cnt = GCONF.cpu_count;
|
||||
if (cpu_cnt <= 0) {
|
||||
cpu_cnt = common::get_cpu_num();
|
||||
}
|
||||
io_config.disk_io_thread_count_ = GCONF.disk_io_thread_count;
|
||||
// In the 2.x version, reuse the sys_bkgd_io_timeout configuration item to indicate the data disk io timeout time
|
||||
// After version 3.1, use the data_storage_io_timeout configuration item.
|
||||
io_config.data_storage_io_timeout_ms_ = GCONF._data_storage_io_timeout / 1000L;
|
||||
io_config.data_storage_warning_tolerance_time_ = GCONF.data_storage_warning_tolerance_time;
|
||||
io_config.data_storage_error_tolerance_time_ = GCONF.data_storage_error_tolerance_time;
|
||||
if (!is_arbitration_mode
|
||||
&& OB_FAIL(ObIOManager::get_instance().set_io_config(io_config))) {
|
||||
real_ret = ret;
|
||||
LOG_WARN("reload io manager config fail, ", K(ret));
|
||||
}
|
||||
|
||||
(void)reload_diagnose_info_config(GCONF.enable_perf_event);
|
||||
(void)reload_trace_log_config(GCONF.enable_record_trace_log);
|
||||
(void)reload_diagnose_info_config(GCONF.enable_perf_event);
|
||||
(void)reload_trace_log_config(GCONF.enable_record_trace_log);
|
||||
|
||||
reload_tenant_freezer_config_();
|
||||
reload_tenant_scheduler_config_();
|
||||
reload_tenant_freezer_config_();
|
||||
reload_tenant_scheduler_config_();
|
||||
}
|
||||
}
|
||||
{
|
||||
ObMallocAllocator *malloc_allocator = ObMallocAllocator::get_instance();
|
||||
@ -190,14 +195,18 @@ int ObServerReloadConfig::operator()()
|
||||
const int64_t cache_size = GCONF.memory_chunk_cache_size;
|
||||
const int cache_cnt = (cache_size > 0 ? cache_size : GMEMCONF.get_server_memory_limit()) / INTACT_ACHUNK_SIZE;
|
||||
lib::AChunkMgr::instance().set_max_chunk_cache_cnt(cache_cnt);
|
||||
if (GCONF.cluster_id.get_value() >= 0) {
|
||||
obrpc::ObRpcNetHandler::CLUSTER_ID = GCONF.cluster_id.get_value();
|
||||
LOG_INFO("set CLUSTER_ID for rpc", "cluster_id", GCONF.cluster_id.get_value());
|
||||
}
|
||||
|
||||
if (FAILEDx(set_cluster_name_hash(GCONF.cluster.str()))) {
|
||||
LOG_WARN("failed to set_cluster_name_hash", KR(ret), "cluster_name", GCONF.cluster.str(),
|
||||
"cluster_name_len", strlen(GCONF.cluster.str()));
|
||||
if (!is_arbitration_mode) {
|
||||
// Refresh cluster_id, cluster_name_hash for non arbitration mode
|
||||
if (GCONF.cluster_id.get_value() > 0) {
|
||||
obrpc::ObRpcNetHandler::CLUSTER_ID = GCONF.cluster_id.get_value();
|
||||
LOG_INFO("set CLUSTER_ID for rpc", "cluster_id", GCONF.cluster_id.get_value());
|
||||
}
|
||||
|
||||
if (FAILEDx(set_cluster_name_hash(GCONF.cluster.str()))) {
|
||||
LOG_WARN("failed to set_cluster_name_hash", KR(ret), "cluster_name", GCONF.cluster.str(),
|
||||
"cluster_name_len", strlen(GCONF.cluster.str()));
|
||||
}
|
||||
}
|
||||
|
||||
// reset mem leak
|
||||
@ -250,7 +259,7 @@ int ObServerReloadConfig::operator()()
|
||||
obrpc::set_rpc_checksum_check_level(new_level);
|
||||
}
|
||||
|
||||
{
|
||||
if (!is_arbitration_mode) {
|
||||
auto new_upgrade_stage = obrpc::get_upgrade_stage(GCONF._upgrade_stage.str());
|
||||
auto orig_upgrade_stage = GCTX.get_upgrade_stage();
|
||||
if (new_upgrade_stage != orig_upgrade_stage) {
|
||||
@ -267,8 +276,8 @@ int ObServerReloadConfig::operator()()
|
||||
|
||||
lib::g_runtime_enabled = true;
|
||||
|
||||
common::ObKVGlobalCache::get_instance().reload_wash_interval();
|
||||
{
|
||||
if (!is_arbitration_mode) {
|
||||
common::ObKVGlobalCache::get_instance().reload_wash_interval();
|
||||
int tmp_ret = OB_SUCCESS;
|
||||
int64_t data_disk_size = 0;
|
||||
int64_t data_disk_percentage = 0;
|
||||
|
||||
Reference in New Issue
Block a user