提交 d7c7ca8f 编写于 作者: O obdev 提交者: wangzelin.wzl

add enable_cgroup cluster config

上级 4ffe4044
......@@ -1295,3 +1295,7 @@ DEF_STR_LIST(sanity_whitelist, OB_CLUSTER_PARAMETER, "", "vip who wouldn't leadi
DEF_TIME(_advance_checkpoint_timeout, OB_CLUSTER_PARAMETER, "30m", "[10s,180m]",
"the timeout for backup/migrate advance checkpoint Range: [10s,180m]",
ObParameterAttr(Section::ROOT_SERVICE, Source::DEFAULT, EditLevel::DYNAMIC_EFFECTIVE));
DEF_BOOL(enable_cgroup, OB_CLUSTER_PARAMETER, "True",
"when set to false, cgroup will not init; when set to true but cgroup root dir is not ready, print ERROR",
ObParameterAttr(Section::OBSERVER, Source::DEFAULT, EditLevel::STATIC_EFFECTIVE));
......@@ -40,7 +40,9 @@ ObCgSet ObCgSet::instance_;
int ObCgroupCtrl::init()
{
int ret = OB_SUCCESS;
if (OB_FAIL(init_cgroup_root_dir_(root_cgroup_))) {
if (GCONF.enable_cgroup == false) {
// not init cgroup when config set to false
} else if (OB_FAIL(init_cgroup_root_dir_(root_cgroup_))) {
LOG_WARN("init cgroup dir failed", K(ret), K(root_cgroup_));
} else if (OB_FAIL(init_cgroup_dir_(other_cgroup_))) {
LOG_WARN("init other cgroup dir failed", K(ret), K_(other_cgroup));
......
......@@ -64,6 +64,7 @@ devname
disk_io_thread_count
dtl_buffer_size
enable_async_syslog
enable_cgroup
enable_ddl
enable_early_lock_release
enable_major_freeze
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册