Switch GV$SESSION_LONGOPS target column to use target table id
This commit is contained in:
@ -71,7 +71,7 @@ int ObColumnRedefinitionTask::init(const uint64_t tenant_id, const int64_t task_
|
||||
parallelism_ = parallelism;
|
||||
execution_id_ = 1L;
|
||||
start_time_ = ObTimeUtility::current_time();
|
||||
if (OB_FAIL(init_ddl_task_monitor_info(&alter_table_arg_.alter_table_schema_))) {
|
||||
if (OB_FAIL(init_ddl_task_monitor_info(target_object_id_))) {
|
||||
LOG_WARN("init ddl task monitor info failed", K(ret));
|
||||
} else {
|
||||
data_format_version_ = tenant_data_format_version;
|
||||
@ -123,7 +123,7 @@ int ObColumnRedefinitionTask::init(const ObDDLTaskRecord &task_record)
|
||||
tenant_id_ = task_record.tenant_id_;
|
||||
ret_code_ = task_record.ret_code_;
|
||||
start_time_ = ObTimeUtility::current_time();
|
||||
if (OB_FAIL(init_ddl_task_monitor_info(&alter_table_arg_.alter_table_schema_))) {
|
||||
if (OB_FAIL(init_ddl_task_monitor_info(target_object_id_))) {
|
||||
LOG_WARN("init ddl task monitor info failed", K(ret));
|
||||
} else {
|
||||
is_inited_ = true;
|
||||
|
||||
@ -3198,17 +3198,14 @@ int ObDDLTaskRecordOperator::kill_task_inner_sql(
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObDDLTask::init_ddl_task_monitor_info(const ObTableSchema *target_schema)
|
||||
int ObDDLTask::init_ddl_task_monitor_info(const uint64_t target_table_id)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
const char *ddl_type_str = nullptr;
|
||||
const char *target_name = nullptr;
|
||||
if (OB_ISNULL(target_schema)) {
|
||||
ret = OB_INVALID_ARGUMENT;
|
||||
LOG_WARN("invalid arguments", K(ret), KP(target_schema));
|
||||
} else if (OB_FAIL(get_ddl_type_str(task_type_, ddl_type_str))) {
|
||||
if (OB_FAIL(get_ddl_type_str(task_type_, ddl_type_str))) {
|
||||
LOG_WARN("failed to get ddl type str", K(ret));
|
||||
} else if (OB_FAIL(stat_info_.init(ddl_type_str, target_schema->get_table_id()))) {
|
||||
} else if (OB_FAIL(stat_info_.init(ddl_type_str, target_table_id))) {
|
||||
LOG_WARN("failed to init stat info", K(ret));
|
||||
}
|
||||
return ret;
|
||||
|
||||
@ -535,7 +535,7 @@ protected:
|
||||
return !share::ObIDDLTask::in_ddl_retry_black_list(ret_code) && (share::ObIDDLTask::in_ddl_retry_white_list(ret_code)
|
||||
|| MAX_ERR_TOLERANCE_CNT > ++err_code_occurence_cnt_);
|
||||
}
|
||||
int init_ddl_task_monitor_info(const ObTableSchema *target_schema);
|
||||
int init_ddl_task_monitor_info(const uint64_t target_table_id);
|
||||
protected:
|
||||
static const int64_t MAX_ERR_TOLERANCE_CNT = 3L; // Max torlerance count for error code.
|
||||
static const int64_t TASK_EXECUTE_TIME_THRESHOLD = 3 * 24 * 60 * 60 * 1000000L; // 3 days
|
||||
|
||||
@ -366,7 +366,7 @@ int ObIndexBuildTask::init(
|
||||
task_status_ = static_cast<ObDDLTaskStatus>(task_status);
|
||||
}
|
||||
if (OB_FAIL(ret)) {
|
||||
} else if (OB_FAIL(init_ddl_task_monitor_info(data_table_schema))) {
|
||||
} else if (OB_FAIL(init_ddl_task_monitor_info(index_schema->get_table_id()))) {
|
||||
LOG_WARN("init ddl task monitor info failed", K(ret));
|
||||
} else {
|
||||
is_inited_ = true;
|
||||
@ -433,7 +433,7 @@ int ObIndexBuildTask::init(const ObDDLTaskRecord &task_record)
|
||||
ret_code_ = task_record.ret_code_;
|
||||
start_time_ = ObTimeUtility::current_time();
|
||||
|
||||
if (OB_FAIL(init_ddl_task_monitor_info(data_schema))) {
|
||||
if (OB_FAIL(init_ddl_task_monitor_info(index_schema->get_table_id()))) {
|
||||
LOG_WARN("init ddl task monitor info failed", K(ret));
|
||||
} else {
|
||||
is_inited_ = true;
|
||||
|
||||
@ -76,7 +76,7 @@ int ObTableRedefinitionTask::init(const uint64_t tenant_id, const int64_t task_i
|
||||
data_format_version_ = tenant_data_format_version;
|
||||
alter_table_arg_.exec_tenant_id_ = tenant_id_;
|
||||
start_time_ = ObTimeUtility::current_time();
|
||||
if (OB_FAIL(init_ddl_task_monitor_info(&alter_table_arg_.alter_table_schema_))) {
|
||||
if (OB_FAIL(init_ddl_task_monitor_info(target_object_id_))) {
|
||||
LOG_WARN("init ddl task monitor info failed", K(ret));
|
||||
} else {
|
||||
is_inited_ = true;
|
||||
@ -117,7 +117,7 @@ int ObTableRedefinitionTask::init(const ObDDLTaskRecord &task_record)
|
||||
alter_table_arg_.exec_tenant_id_ = tenant_id_;
|
||||
start_time_ = ObTimeUtility::current_time();
|
||||
|
||||
if (OB_FAIL(init_ddl_task_monitor_info(&alter_table_arg_.alter_table_schema_))) {
|
||||
if (OB_FAIL(init_ddl_task_monitor_info(target_object_id_))) {
|
||||
LOG_WARN("init ddl task monitor info failed", K(ret));
|
||||
} else {
|
||||
is_inited_ = true;
|
||||
|
||||
Reference in New Issue
Block a user