Adjust location cache's thread cnt dynamically

This commit is contained in:
wangzelin.wzl
2021-10-13 11:11:09 +08:00
parent 5003ce27b7
commit 52d765e9a6
7 changed files with 66 additions and 3 deletions

View File

@ -29,6 +29,7 @@
#include "observer/ob_server.h"
#include "storage/ob_partition_scheduler.h"
#include "storage/ob_partition_migrator.h"
#include "observer/ob_service.h"
using namespace oceanbase::lib;
using namespace oceanbase::common;
@ -338,5 +339,13 @@ int ObServerReloadConfig::operator()()
{
OB_STORE_FILE.resize_file(GCONF.datafile_size, GCONF.datafile_disk_percentage);
}
{
const int64_t location_thread_cnt = GCONF.location_refresh_thread_count;
if (OB_NOT_NULL(GCTX.ob_service_) &&
OB_FAIL(GCTX.ob_service_->get_partition_location_updater().set_thread_cnt(location_thread_cnt))) {
real_ret = ret;
LOG_WARN("fail to set location updater's thread cnt", KR(ret), K(location_thread_cnt));
}
}
return real_ret;
}