Fix unexpected recovery of child table fk by recover table

This commit is contained in:
Hongqin-Li
2023-11-09 14:35:55 +00:00
committed by ob-robot
parent 7cbba14c87
commit 5c58c5e0f9
2 changed files with 2 additions and 4 deletions

View File

@ -1238,7 +1238,8 @@ int ObIndexBuildTask::update_index_status_in_schema(const ObTableSchema &index_s
}
DEBUG_SYNC(BEFORE_UPDATE_GLOBAL_INDEX_STATUS);
if (OB_FAIL(ObDDLUtil::get_ddl_rpc_timeout(index_schema.get_all_part_num(), ddl_rpc_timeout))) {
if (OB_FAIL(ret)) {
} else if (OB_FAIL(ObDDLUtil::get_ddl_rpc_timeout(index_schema.get_all_part_num(), ddl_rpc_timeout))) {
LOG_WARN("get ddl rpc timeout fail", K(ret));
} else if (OB_FAIL(ObDDLUtil::get_ddl_rpc_timeout(tenant_id_, index_schema.get_data_table_id(), tmp_timeout))) {
LOG_WARN("get ddl rpc timeout fail", K(ret));

View File

@ -17380,9 +17380,6 @@ int ObDDLService::make_recover_restore_tables_visible(obrpc::ObAlterTableArg &al
} else if (OB_FAIL(check_and_replace_dup_constraint_name_on_demand(is_oracle_mode,
*dst_tenant_schema_guard, tmp_schema, allocator, ddl_operator, trans))) {
LOG_WARN("check dup and replace cst name failed", K(ret));
} else if (OB_FAIL(rebuild_hidden_table_foreign_key(alter_table_arg,
*orig_table_schema, *hidden_table_schema, true/*rebuild_child_table_fk*/, *src_tenant_schema_guard, *dst_tenant_schema_guard, trans, unused_cst_ids))) {
LOG_WARN("failed to rebuild hidden table fk", K(ret));
} else if (OB_FAIL(rebuild_triggers_on_hidden_table(*orig_table_schema, *hidden_table_schema,
*src_tenant_schema_guard, *dst_tenant_schema_guard, ddl_operator, trans))) {
LOG_WARN("rebuild triggers failed", K(ret));