persist cluster version for ddl.

This commit is contained in:
obdev
2022-12-29 14:38:06 +00:00
committed by ob-robot
parent c6977f3e3f
commit 4f6f8b11f3
22 changed files with 139 additions and 41 deletions

View File

@ -115,8 +115,10 @@ int ObComplementDataParam::init(const ObDDLBuildSingleReplicaRequestArg &arg)
task_id_ = arg.task_id_;
execution_id_ = arg.execution_id_;
tablet_task_id_ = arg.tablet_task_id_;
cluster_version_ = arg.cluster_version_;
FLOG_INFO("succeed to init ObComplementDataParam", K(ret), K(is_inited_), K(tenant_id_), K(ls_id_),
K(source_tablet_id_), K(dest_tablet_id_), K(schema_version_), K(task_id_), K(arg), K(concurrent_cnt_));
K(source_tablet_id_), K(dest_tablet_id_), K(schema_version_), K(task_id_), K(arg), K(concurrent_cnt_),
K(cluster_version_));
}
return ret;
}
@ -334,7 +336,8 @@ int ObComplementDataContext::write_start_log(const ObComplementDataParam &param)
} else if (OB_UNLIKELY(!hidden_table_key.is_valid())) {
ret = OB_INVALID_ARGUMENT;
LOG_WARN("invalid table key", K(ret), K(hidden_table_key));
} else if (OB_FAIL(data_sstable_redo_writer_.start_ddl_redo(hidden_table_key, param.execution_id_, ddl_kv_mgr_handle_))) {
} else if (OB_FAIL(data_sstable_redo_writer_.start_ddl_redo(hidden_table_key,
param.execution_id_, param.cluster_version_, ddl_kv_mgr_handle_))) {
LOG_WARN("fail write start log", K(ret), K(hidden_table_key), K(param));
} else {
LOG_INFO("complement task start ddl redo success", K(hidden_table_key));
@ -447,7 +450,8 @@ int ObComplementDataDag::prepare_context()
param_.ls_id_,
param_.dest_tablet_id_,
MAJOR_MERGE,
param_.snapshot_version_))) {
param_.snapshot_version_,
param_.cluster_version_))) {
LOG_WARN("fail to init data desc", K(ret));
} else {
data_desc.row_column_count_ = data_desc.rowkey_column_count_ + 1;
@ -981,7 +985,8 @@ int ObComplementWriteTask::append_row(ObLocalScan &local_scan)
param_->ls_id_,
param_->dest_tablet_id_,
MAJOR_MERGE,
param_->snapshot_version_))) {
param_->snapshot_version_,
param_->cluster_version_))) {
LOG_WARN("fail to init data store desc", K(ret), K(*param_), K(param_->dest_tablet_id_));
} else if (FALSE_IT(data_desc.sstable_index_builder_ = context_->index_builder_)) {
} else if (FALSE_IT(data_desc.is_ddl_ = true)) {