fix update plan detective failed

This commit is contained in:
obdev 2024-09-20 06:51:52 +00:00 committed by ob-robot
parent 1c25114a70
commit a313f8d0a1
2 changed files with 6 additions and 2 deletions

View File

@ -1080,9 +1080,10 @@ int ObResourceManagerProxy::update_plan_directive(
LOG_USER_ERROR(OB_ERR_PLAN_DIRECTIVE_NOT_EXIST,
plan.length(), plan.ptr(), group.length(), group.ptr());
} else if (comments.is_null() && mgmt_p1.is_null() && utilization_limit.is_null() &&
min_iops.is_null() && max_iops.is_null() && weight_iops.is_null()) {
min_iops.is_null() && max_iops.is_null() && weight_iops.is_null() && max_net_bandwidth.is_null() && net_bandwidth_weight.is_null()) {
// 没有指定任何有效参数,什么都不做,也不报错。兼容 Oracle 行为。
ret = OB_SUCCESS;
LOG_WARN("did not receive any valid parameter", K(ret));
} else if (OB_FAIL(sql.assign_fmt("UPDATE /* UPDATE_PLAN_DIRECTIVE */ %s SET ", tname))) {
STORAGE_LOG(WARN, "append table name failed, ", K(ret));
} else {
@ -1179,6 +1180,8 @@ int ObResourceManagerProxy::update_plan_directive(
LOG_WARN("fail get percentage", K(ret));
} else if (OB_FAIL(sql.append_fmt("%s MAX_NET_BANDWIDTH=%ld", comma, v))) {
LOG_WARN("fail append value", K(ret));
} else {
comma = ",";
}
}
}
@ -1188,6 +1191,8 @@ int ObResourceManagerProxy::update_plan_directive(
LOG_WARN("fail get percentage", K(ret));
} else if (OB_FAIL(sql.append_fmt("%s NET_BANDWIDTH_WEIGHT=%ld", comma, v))) {
LOG_WARN("fail append value", K(ret));
} else {
comma = ",";
}
}
}

View File

@ -11,7 +11,6 @@
*/
#define USING_LOG_PREFIX SHARE
#include "ob_resource_plan_info.h"
using namespace oceanbase::common;