fix ddl child tasks recover failed.

This commit is contained in:
obdev
2023-06-14 07:24:04 +00:00
committed by ob-robot
parent 8b3da8999e
commit 8c6b7f1f62
6 changed files with 44 additions and 42 deletions

View File

@ -487,19 +487,18 @@ int ObTableRedefinitionTask::copy_table_indexes()
}
}
if (OB_SUCC(ret) && need_rebuild_index) {
TCWLockGuard guard(lock_);
const uint64_t task_key = index_ids.at(i);
DependTaskStatus status;
status.task_id_ = task_record.task_id_;
TCWLockGuard guard(lock_);
if (OB_FAIL(dependent_task_result_map_.set_refactored(task_key, status))) {
if (OB_HASH_EXIST == ret) {
ret = OB_SUCCESS;
} else {
if (OB_FAIL(dependent_task_result_map_.get_refactored(task_key, status))) {
if (OB_HASH_NOT_EXIST != ret) {
LOG_WARN("get from dependent task map failed", K(ret));
} else if (OB_FAIL(dependent_task_result_map_.set_refactored(task_key, status))) {
LOG_WARN("set dependent task map failed", K(ret), K(task_key));
}
} else {
LOG_INFO("add build index task", K(task_key));
}
LOG_INFO("add build index task", K(ret), K(task_key), K(status));
}
}
}