fix create hidden table hold too much memory
This commit is contained in:
parent
80f57afdf1
commit
4f66a31a19
@ -300,17 +300,6 @@ int ObBuildMViewTask::cleanup_impl()
|
||||
return ret;
|
||||
}
|
||||
|
||||
void ObBuildMViewTask::flt_set_task_span_tag() const
|
||||
{
|
||||
LOG_INFO("flt_set_task_span_tag begin");
|
||||
}
|
||||
|
||||
void ObBuildMViewTask::flt_set_status_span_tag() const
|
||||
{
|
||||
LOG_INFO("flt_set_status_span_tag begin");
|
||||
}
|
||||
|
||||
|
||||
int ObBuildMViewTask::mview_complete_refresh(obrpc::ObMViewCompleteRefreshRes &res)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
|
@ -37,8 +37,6 @@ public:
|
||||
const int64_t snapshot_version = 0);
|
||||
virtual int process() override;
|
||||
virtual int cleanup_impl() override;
|
||||
virtual void flt_set_task_span_tag() const override;
|
||||
virtual void flt_set_status_span_tag() const override;
|
||||
virtual int serialize_params_to_message(char *buf,
|
||||
const int64_t buf_size,
|
||||
int64_t &pos) const override;
|
||||
|
@ -798,51 +798,3 @@ int ObColumnRedefinitionTask::collect_longops_stat(ObLongopsValue &value)
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void ObColumnRedefinitionTask::flt_set_task_span_tag() const
|
||||
{
|
||||
FLT_SET_TAG(ddl_task_id, task_id_, ddl_parent_task_id, parent_task_id_,
|
||||
ddl_data_table_id, object_id_, ddl_schema_version, schema_version_,
|
||||
ddl_snapshot_version, snapshot_version_, ddl_ret_code, ret_code_);
|
||||
}
|
||||
|
||||
void ObColumnRedefinitionTask::flt_set_status_span_tag() const
|
||||
{
|
||||
switch (task_status_) {
|
||||
case ObDDLTaskStatus::PREPARE: {
|
||||
FLT_SET_TAG(ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
case ObDDLTaskStatus::WAIT_TRANS_END: {
|
||||
FLT_SET_TAG(ddl_data_table_id, object_id_, ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
case ObDDLTaskStatus::OBTAIN_SNAPSHOT: {
|
||||
FLT_SET_TAG(ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
case ObDDLTaskStatus::REDEFINITION: {
|
||||
FLT_SET_TAG(ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
case ObDDLTaskStatus::COPY_TABLE_DEPENDENT_OBJECTS: {
|
||||
FLT_SET_TAG(ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
case ObDDLTaskStatus::TAKE_EFFECT: {
|
||||
FLT_SET_TAG(ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
case ObDDLTaskStatus::FAIL: {
|
||||
FLT_SET_TAG(ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
case ObDDLTaskStatus::SUCCESS: {
|
||||
FLT_SET_TAG(ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
@ -52,8 +52,6 @@ public:
|
||||
const ObDDLTaskInfo &addition_info) override;
|
||||
virtual int collect_longops_stat(share::ObLongopsValue &value) override;
|
||||
virtual bool support_longops_monitoring() const { return true; }
|
||||
virtual void flt_set_task_span_tag() const override;
|
||||
virtual void flt_set_status_span_tag() const override;
|
||||
virtual int serialize_params_to_message(char *buf, const int64_t buf_len, int64_t &pos) const override;
|
||||
virtual int deserialize_params_from_message(const uint64_t tenant_id, const char *buf, const int64_t data_len, int64_t &pos) override;
|
||||
virtual int64_t get_serialize_param_size() const override;
|
||||
|
@ -2054,39 +2054,3 @@ int64_t ObConstraintTask::get_serialize_param_size() const
|
||||
{
|
||||
return alter_table_arg_.get_serialize_size() + ObDDLTask::get_serialize_param_size();
|
||||
}
|
||||
void ObConstraintTask::flt_set_task_span_tag() const
|
||||
{
|
||||
FLT_SET_TAG(ddl_task_id, task_id_, ddl_parent_task_id, parent_task_id_,
|
||||
ddl_data_table_id, object_id_, ddl_schema_version, schema_version_,
|
||||
ddl_snapshot_version, snapshot_version_);
|
||||
}
|
||||
|
||||
void ObConstraintTask::flt_set_status_span_tag() const
|
||||
{
|
||||
switch (task_status_) {
|
||||
case ObDDLTaskStatus::WAIT_TRANS_END: {
|
||||
FLT_SET_TAG(ddl_data_table_id, object_id_, ddl_schema_version, schema_version_,
|
||||
ddl_snapshot_version, snapshot_version_, ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
case ObDDLTaskStatus::CHECK_CONSTRAINT_VALID: {
|
||||
FLT_SET_TAG(ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
case ObDDLTaskStatus::SET_CONSTRAINT_VALIDATE: {
|
||||
FLT_SET_TAG(ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
case ObDDLTaskStatus::FAIL: {
|
||||
FLT_SET_TAG(ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
case ObDDLTaskStatus::SUCCESS: {
|
||||
FLT_SET_TAG(ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -108,8 +108,6 @@ public:
|
||||
virtual int serialize_params_to_message(char *buf, const int64_t buf_size, int64_t &pos) const override;
|
||||
virtual int deserialize_params_from_message(const uint64_t tenant_id, const char *buf, const int64_t buf_size, int64_t &pos) override;
|
||||
virtual int64_t get_serialize_param_size() const override;
|
||||
virtual void flt_set_task_span_tag() const override;
|
||||
virtual void flt_set_status_span_tag() const override;
|
||||
virtual int cleanup_impl() override;
|
||||
private:
|
||||
int hold_snapshot(const int64_t snapshot_version);
|
||||
|
@ -148,8 +148,6 @@ public:
|
||||
const uint64_t child_task_key,
|
||||
const int ret_code) override;
|
||||
int notify_update_autoinc_finish(const uint64_t autoinc_val, const int ret_code);
|
||||
virtual void flt_set_task_span_tag() const = 0;
|
||||
virtual void flt_set_status_span_tag() const = 0;
|
||||
virtual int cleanup_impl() override;
|
||||
int reap_old_replica_build_task(bool &need_exec_new_inner_sql);
|
||||
INHERIT_TO_STRING_KV("ObDDLTask", ObDDLTask,
|
||||
|
@ -734,33 +734,3 @@ int ObDDLRetryTask::update_task_status_wait_child_task_finish(
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
void ObDDLRetryTask::flt_set_task_span_tag() const
|
||||
{
|
||||
FLT_SET_TAG(ddl_task_id, task_id_, ddl_parent_task_id, parent_task_id_, ddl_data_table_id, object_id_);
|
||||
}
|
||||
|
||||
void ObDDLRetryTask::flt_set_status_span_tag() const
|
||||
{
|
||||
switch (task_status_) {
|
||||
case ObDDLTaskStatus::PREPARE: {
|
||||
FLT_SET_TAG(ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
case ObDDLTaskStatus::DROP_SCHEMA: {
|
||||
FLT_SET_TAG(ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
case ObDDLTaskStatus::FAIL: {
|
||||
FLT_SET_TAG(ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
case ObDDLTaskStatus::SUCCESS: {
|
||||
FLT_SET_TAG(ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -47,8 +47,6 @@ public:
|
||||
common::ObMySQLTransaction &trans,
|
||||
const uint64_t tenant_id,
|
||||
const int64_t task_id);
|
||||
virtual void flt_set_task_span_tag() const override;
|
||||
virtual void flt_set_status_span_tag() const override;
|
||||
virtual int cleanup_impl() override;
|
||||
private:
|
||||
int check_health();
|
||||
|
@ -348,7 +348,7 @@ void ObDDLTracing::end_task_span()
|
||||
int ret = OB_SUCCESS;
|
||||
FLT_RESTORE_DDL_TRACE_CTX(trace_ctx_);
|
||||
FLT_SET_AUTO_FLUSH(true);
|
||||
task_->flt_set_task_span_tag();
|
||||
// task_->flt_set_task_span_tag();
|
||||
// TODO hanxuan fix MTL_SWITCH
|
||||
MTL_SWITCH(OB_SYS_TENANT_ID) {
|
||||
FLT_END_SPAN(task_span_);
|
||||
@ -513,7 +513,7 @@ void ObDDLTracing::end_status_span()
|
||||
int ret = OB_SUCCESS;
|
||||
FLT_RESTORE_DDL_TRACE_CTX(trace_ctx_);
|
||||
FLT_SET_AUTO_FLUSH(true);
|
||||
task_->flt_set_status_span_tag();
|
||||
//task_->flt_set_status_span_tag();
|
||||
// TODO hanxuan fix MTL_SWITCH
|
||||
MTL_SWITCH(OB_SYS_TENANT_ID) {
|
||||
FLT_END_SPAN(status_span_);
|
||||
|
@ -544,8 +544,11 @@ public:
|
||||
longops_stat_(nullptr), gmt_create_(0), stat_info_(), delay_schedule_time_(0), next_schedule_ts_(0),
|
||||
execution_id_(-1), start_time_(0), data_format_version_(0), is_pre_split_(false), wait_trans_ctx_()
|
||||
{}
|
||||
ObDDLTask():
|
||||
ObDDLTask(share::DDL_INVALID)
|
||||
{}
|
||||
virtual ~ObDDLTask() {}
|
||||
virtual int process() = 0;
|
||||
virtual int process() { return OB_NOT_SUPPORTED; }
|
||||
virtual int on_child_task_finish(const uint64_t child_task_key, const int ret_code) { return common::OB_NOT_SUPPORTED; }
|
||||
virtual bool is_valid() const { return is_inited_; }
|
||||
typedef common::ObCurTraceId::TraceId TraceId;
|
||||
@ -627,9 +630,7 @@ public:
|
||||
static bool check_is_load_data(share::ObDDLType task_type);
|
||||
virtual bool support_longops_monitoring() const { return false; }
|
||||
int cleanup();
|
||||
virtual int cleanup_impl() = 0;
|
||||
virtual void flt_set_task_span_tag() const = 0;
|
||||
virtual void flt_set_status_span_tag() const = 0;
|
||||
virtual int cleanup_impl() { return OB_NOT_SUPPORTED; }
|
||||
int update_task_record_status_and_msg(common::ObISQLClient &proxy, const share::ObDDLTaskStatus real_new_status);
|
||||
|
||||
#ifdef ERRSIM
|
||||
|
@ -235,16 +235,6 @@ int64_t ObDropFTSIndexTask::get_serialize_param_size() const
|
||||
+ fts_doc_word_.get_serialize_size();
|
||||
}
|
||||
|
||||
void ObDropFTSIndexTask::flt_set_task_span_tag() const
|
||||
{
|
||||
// TODO: @hanxuan, add me for tracing.
|
||||
}
|
||||
|
||||
void ObDropFTSIndexTask::flt_set_status_span_tag() const
|
||||
{
|
||||
// TODO: @hanxuan, add me for tracing.
|
||||
}
|
||||
|
||||
int ObDropFTSIndexTask::check_switch_succ()
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
|
@ -63,8 +63,6 @@ public:
|
||||
int64_t &pos) override;
|
||||
virtual int64_t get_serialize_param_size() const override;
|
||||
|
||||
virtual void flt_set_task_span_tag() const override;
|
||||
virtual void flt_set_status_span_tag() const override;
|
||||
virtual int on_child_task_finish(const uint64_t child_task_key, const int ret_code) override { return OB_SUCCESS; }
|
||||
|
||||
INHERIT_TO_STRING_KV("ObDDLTask", ObDDLTask, K_(rowkey_doc), K_(doc_rowkey), K_(domain_index), K_(fts_doc_word));
|
||||
|
@ -481,51 +481,3 @@ int64_t ObDropIndexTask::get_serialize_param_size() const
|
||||
{
|
||||
return drop_index_arg_.get_serialize_size() + ObDDLTask::get_serialize_param_size();
|
||||
}
|
||||
|
||||
void ObDropIndexTask::flt_set_task_span_tag() const
|
||||
{
|
||||
FLT_SET_TAG(ddl_task_id, task_id_, ddl_parent_task_id, parent_task_id_,
|
||||
ddl_data_table_id, object_id_, ddl_index_table_id, target_object_id_,
|
||||
ddl_schema_version, schema_version_);
|
||||
}
|
||||
|
||||
void ObDropIndexTask::flt_set_status_span_tag() const
|
||||
{
|
||||
switch (task_status_) {
|
||||
case ObDDLTaskStatus::PREPARE: {
|
||||
FLT_SET_TAG(ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
case ObDDLTaskStatus::SET_WRITE_ONLY: {
|
||||
FLT_SET_TAG(ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
case ObDDLTaskStatus::WAIT_TRANS_END_FOR_WRITE_ONLY: {
|
||||
FLT_SET_TAG(ddl_data_table_id, object_id_, ddl_snapshot_version, snapshot_version_, ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
case ObDDLTaskStatus::SET_UNUSABLE: {
|
||||
FLT_SET_TAG(ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
case ObDDLTaskStatus::WAIT_TRANS_END_FOR_UNUSABLE: {
|
||||
FLT_SET_TAG(ddl_data_table_id, object_id_, ddl_snapshot_version, snapshot_version_, ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
case ObDDLTaskStatus::DROP_SCHEMA: {
|
||||
FLT_SET_TAG(ddl_index_table_id, target_object_id_, ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
case ObDDLTaskStatus::FAIL: {
|
||||
FLT_SET_TAG(ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
case ObDDLTaskStatus::SUCCESS: {
|
||||
FLT_SET_TAG(ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -43,8 +43,6 @@ public:
|
||||
virtual int deserialize_params_from_message(const uint64_t tenant_id, const char *buf, const int64_t buf_size, int64_t &pos) override;
|
||||
virtual int64_t get_serialize_param_size() const override;
|
||||
INHERIT_TO_STRING_KV("ObDDLTask", ObDDLTask, KP_(root_service));
|
||||
virtual void flt_set_task_span_tag() const override;
|
||||
virtual void flt_set_status_span_tag() const override;
|
||||
virtual int cleanup_impl() override;
|
||||
private:
|
||||
int check_switch_succ();
|
||||
|
@ -127,54 +127,3 @@ int ObDropPrimaryKeyTask::process()
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
void ObDropPrimaryKeyTask::flt_set_task_span_tag() const
|
||||
{
|
||||
FLT_SET_TAG(ddl_task_id, task_id_, ddl_parent_task_id, parent_task_id_,
|
||||
ddl_data_table_id, object_id_, ddl_schema_version, schema_version_);
|
||||
}
|
||||
|
||||
void ObDropPrimaryKeyTask::flt_set_status_span_tag() const
|
||||
{
|
||||
switch (task_status_) {
|
||||
case ObDDLTaskStatus::PREPARE: {
|
||||
FLT_SET_TAG(ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
case ObDDLTaskStatus::OBTAIN_SNAPSHOT: {
|
||||
FLT_SET_TAG(ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
case ObDDLTaskStatus::WAIT_TRANS_END: {
|
||||
FLT_SET_TAG(ddl_data_table_id, object_id_, ddl_schema_version, schema_version_,
|
||||
ddl_snapshot_version, snapshot_version_, ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
case ObDDLTaskStatus::REDEFINITION: {
|
||||
FLT_SET_TAG(ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
case ObDDLTaskStatus::COPY_TABLE_DEPENDENT_OBJECTS: {
|
||||
FLT_SET_TAG(ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
case ObDDLTaskStatus::MODIFY_AUTOINC: {
|
||||
FLT_SET_TAG(ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
case ObDDLTaskStatus::TAKE_EFFECT: {
|
||||
FLT_SET_TAG(ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
case ObDDLTaskStatus::FAIL: {
|
||||
FLT_SET_TAG(ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
case ObDDLTaskStatus::SUCCESS: {
|
||||
FLT_SET_TAG(ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -40,8 +40,6 @@ public:
|
||||
const int64_t task_status = share::ObDDLTaskStatus::PREPARE,
|
||||
const int64_t snapshot_version = 0);
|
||||
virtual int process() override;
|
||||
virtual void flt_set_task_span_tag() const override;
|
||||
virtual void flt_set_status_span_tag() const override;
|
||||
private:
|
||||
static const int64_t OB_DROP_PRIMARY_KEY_TASK_VERSION = 1L;
|
||||
};
|
||||
|
@ -1655,13 +1655,5 @@ int ObFtsIndexBuildTask::cleanup_impl()
|
||||
return ret;
|
||||
}
|
||||
|
||||
void ObFtsIndexBuildTask::flt_set_task_span_tag() const
|
||||
{
|
||||
}
|
||||
|
||||
void ObFtsIndexBuildTask::flt_set_status_span_tag() const
|
||||
{
|
||||
}
|
||||
|
||||
} // end namespace rootserver
|
||||
} // end namespace oceanbase
|
||||
|
@ -39,8 +39,6 @@ public:
|
||||
const int64_t snapshot_version = 0);
|
||||
int init(const ObDDLTaskRecord &task_record);
|
||||
virtual int process() override;
|
||||
virtual void flt_set_task_span_tag() const override;
|
||||
virtual void flt_set_status_span_tag() const override;
|
||||
virtual int cleanup_impl() override;
|
||||
virtual bool is_valid() const override;
|
||||
virtual int collect_longops_stat(share::ObLongopsValue &value) override;
|
||||
|
@ -346,52 +346,6 @@ int ObIndexBuildTask::process()
|
||||
return ret;
|
||||
}
|
||||
|
||||
void ObIndexBuildTask::flt_set_task_span_tag() const
|
||||
{
|
||||
FLT_SET_TAG(ddl_task_id, task_id_, ddl_parent_task_id, parent_task_id_,
|
||||
ddl_data_table_id, object_id_, ddl_index_table_id, index_table_id_,
|
||||
ddl_is_unique_index, is_unique_index_, ddl_is_global_index, is_global_index_,
|
||||
ddl_schema_version, schema_version_);
|
||||
}
|
||||
|
||||
void ObIndexBuildTask::flt_set_status_span_tag() const
|
||||
{
|
||||
switch (task_status_) {
|
||||
case ObDDLTaskStatus::PREPARE: {
|
||||
FLT_SET_TAG(ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
case ObDDLTaskStatus::WAIT_TRANS_END: {
|
||||
FLT_SET_TAG(ddl_data_table_id, object_id_, ddl_index_table_id, index_table_id_, ddl_schema_version, schema_version_,
|
||||
ddl_snapshot_version, snapshot_version_, ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
case ObDDLTaskStatus::REDEFINITION: {
|
||||
FLT_SET_TAG(ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
case ObDDLTaskStatus::VALIDATE_CHECKSUM: {
|
||||
FLT_SET_TAG(ddl_check_unique_snapshot, check_unique_snapshot_, ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
case ObDDLTaskStatus::TAKE_EFFECT: {
|
||||
FLT_SET_TAG(ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
case ObDDLTaskStatus::FAIL: {
|
||||
FLT_SET_TAG(ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
case ObDDLTaskStatus::SUCCESS: {
|
||||
FLT_SET_TAG(ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int ObIndexBuildTask::init(
|
||||
const uint64_t tenant_id,
|
||||
const int64_t task_id,
|
||||
|
@ -116,8 +116,6 @@ public:
|
||||
const int ret_code,
|
||||
const ObDDLTaskInfo &addition_info);
|
||||
virtual int process() override;
|
||||
virtual void flt_set_task_span_tag() const override;
|
||||
virtual void flt_set_status_span_tag() const override;
|
||||
virtual int cleanup_impl() override;
|
||||
virtual bool is_valid() const override;
|
||||
virtual int collect_longops_stat(share::ObLongopsValue &value) override;
|
||||
|
@ -673,39 +673,3 @@ int64_t ObModifyAutoincTask::get_serialize_param_size() const
|
||||
{
|
||||
return alter_table_arg_.get_serialize_size() + ObDDLTask::get_serialize_param_size();
|
||||
}
|
||||
|
||||
void ObModifyAutoincTask::flt_set_task_span_tag() const
|
||||
{
|
||||
FLT_SET_TAG(ddl_task_id, task_id_, ddl_parent_task_id, parent_task_id_,
|
||||
ddl_data_table_id, object_id_, ddl_schema_version, schema_version_,
|
||||
ddl_snapshot_version, snapshot_version_, ddl_ret_code, ret_code_);
|
||||
}
|
||||
|
||||
void ObModifyAutoincTask::flt_set_status_span_tag() const
|
||||
{
|
||||
switch (task_status_) {
|
||||
case ObDDLTaskStatus::WAIT_TRANS_END: {
|
||||
FLT_SET_TAG(ddl_data_table_id, object_id_, ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
case ObDDLTaskStatus::OBTAIN_SNAPSHOT: {
|
||||
FLT_SET_TAG(ddl_data_table_id, object_id_, ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
case ObDDLTaskStatus::MODIFY_AUTOINC: {
|
||||
FLT_SET_TAG(ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
case ObDDLTaskStatus::FAIL: {
|
||||
FLT_SET_TAG(ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
case ObDDLTaskStatus::SUCCESS: {
|
||||
FLT_SET_TAG(ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -69,8 +69,6 @@ public:
|
||||
virtual int deserialize_params_from_message(const uint64_t tenant_id, const char *buf, const int64_t buf_size, int64_t &pos) override;
|
||||
virtual int64_t get_serialize_param_size() const override;
|
||||
int notify_update_autoinc_finish(const uint64_t autoinc_val, const int ret_code);
|
||||
virtual void flt_set_task_span_tag() const override;
|
||||
virtual void flt_set_status_span_tag() const override;
|
||||
virtual int cleanup_impl() override;
|
||||
private:
|
||||
int unlock_table();
|
||||
|
@ -1443,62 +1443,6 @@ int ObTableRedefinitionTask::collect_longops_stat(ObLongopsValue &value)
|
||||
return ret;
|
||||
}
|
||||
|
||||
void ObTableRedefinitionTask::flt_set_task_span_tag() const
|
||||
{
|
||||
FLT_SET_TAG(ddl_task_id, task_id_, ddl_parent_task_id, parent_task_id_,
|
||||
ddl_data_table_id, object_id_, ddl_schema_version, schema_version_,
|
||||
ddl_ret_code, ret_code_);
|
||||
}
|
||||
|
||||
void ObTableRedefinitionTask::flt_set_status_span_tag() const
|
||||
{
|
||||
switch (task_status_) {
|
||||
case ObDDLTaskStatus::PREPARE: {
|
||||
FLT_SET_TAG(ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
case ObDDLTaskStatus::WAIT_TRANS_END: {
|
||||
FLT_SET_TAG(ddl_data_table_id, object_id_, ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
case ObDDLTaskStatus::OBTAIN_SNAPSHOT: {
|
||||
FLT_SET_TAG(ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
case ObDDLTaskStatus::CHECK_TABLE_EMPTY: {
|
||||
FLT_SET_TAG(ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
case ObDDLTaskStatus::REDEFINITION: {
|
||||
FLT_SET_TAG(ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
case ObDDLTaskStatus::COPY_TABLE_DEPENDENT_OBJECTS: {
|
||||
FLT_SET_TAG(ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
case ObDDLTaskStatus::MODIFY_AUTOINC: {
|
||||
FLT_SET_TAG(ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
case ObDDLTaskStatus::TAKE_EFFECT: {
|
||||
FLT_SET_TAG(ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
case ObDDLTaskStatus::FAIL: {
|
||||
FLT_SET_TAG(ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
case ObDDLTaskStatus::SUCCESS: {
|
||||
FLT_SET_TAG(ddl_ret_code, ret_code_);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int ObTableRedefinitionTask::get_direct_load_job_stat(common::ObArenaAllocator &allocator,
|
||||
sql::ObLoadDataStat &job_stat)
|
||||
{
|
||||
|
@ -65,8 +65,6 @@ public:
|
||||
int assign(const ObTableRedefinitionTask *table_redef_task);
|
||||
virtual int collect_longops_stat(share::ObLongopsValue &value) override;
|
||||
virtual bool support_longops_monitoring() const override { return true; }
|
||||
virtual void flt_set_task_span_tag() const override;
|
||||
virtual void flt_set_status_span_tag() const override;
|
||||
static bool check_task_status_is_pending(const share::ObDDLTaskStatus task_status);
|
||||
INHERIT_TO_STRING_KV("ObDDLRedefinitionTask", ObDDLRedefinitionTask,
|
||||
K(has_rebuild_index_), K(has_rebuild_constraint_), K(has_rebuild_foreign_key_),
|
||||
|
@ -1942,29 +1942,11 @@ int ObDDLUtil::get_data_information(
|
||||
|
||||
task_status = static_cast<share::ObDDLTaskStatus>(cur_task_status);
|
||||
if (OB_SUCC(ret)) {
|
||||
if (is_create_index(ddl_type)) {
|
||||
SMART_VAR(rootserver::ObIndexBuildTask, task) {
|
||||
if (OB_FAIL(task.deserialize_params_from_message(tenant_id, task_message.ptr(), task_message.length(), pos))) {
|
||||
LOG_WARN("deserialize from msg failed", K(ret));
|
||||
} else {
|
||||
data_format_version = task.get_data_format_version();
|
||||
}
|
||||
}
|
||||
} else if (is_complement_data_relying_on_dag(ddl_type)) {
|
||||
SMART_VAR(rootserver::ObColumnRedefinitionTask, task) {
|
||||
if (OB_FAIL(task.deserialize_params_from_message(tenant_id, task_message.ptr(), task_message.length(), pos))) {
|
||||
LOG_WARN("deserialize from msg failed", K(ret));
|
||||
} else {
|
||||
data_format_version = task.get_data_format_version();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
SMART_VAR(rootserver::ObTableRedefinitionTask, task) {
|
||||
if (OB_FAIL(task.deserialize_params_from_message(tenant_id, task_message.ptr(), task_message.length(), pos))) {
|
||||
LOG_WARN("deserialize from msg failed", K(ret));
|
||||
} else {
|
||||
data_format_version = task.get_data_format_version();
|
||||
}
|
||||
SMART_VAR(rootserver::ObDDLTask, task) {
|
||||
if (OB_FAIL(task.deserialize_params_from_message(tenant_id, task_message.ptr(), task_message.length(), pos))) {
|
||||
LOG_WARN("deserialize from msg failed", K(ret));
|
||||
} else {
|
||||
data_format_version = task.get_data_format_version();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user