提交 28e38428 编写于 作者: W wxhwang 提交者: wangzelin.wzl

patch to open source

上级 ffd7bbdd
......@@ -2548,6 +2548,10 @@ int ObRootBackup::check_tenant_can_backup(const uint64_t tenant_id, ObSchemaGett
LOG_WARN("failed to get tenant info", K(ret), K(tenant_id));
} else if (tenant_schema->is_restore()) {
can_backup = false;
LOG_WARN("tenant is doing restore", K(tenant_id));
} else if (tenant_schema->is_dropping()) {
can_backup = false;
LOG_WARN("tenant is dropping", K(tenant_id));
}
return ret;
}
......
......@@ -210,6 +210,7 @@ class ObString;
ACT(BEFORE_PHYSICAL_RESTORE_REBUILD_INDEX, ) \
ACT(BEFORE_PHYSICAL_RESTORE_POST_CHECK, ) \
ACT(BACKUP_BEFROE_CHOOSE_SRC, ) \
ACT(BACKUP_BEFROE_BUILD_TABLE_PARTITION_INFO,) \
ACT(HANG_UPDATE_RS_LIST, ) \
ACT(PARTITION_BACKUP_TASK_BEFORE_ADD_TASK_IN_MGR, ) \
ACT(HANG_BEFORE_RESOLVER_FINISH, ) \
......
......@@ -1541,6 +1541,8 @@ int ObBackupPrepareTask::build_table_partition_info(
ObArray<uint64_t> table_id_list;
ObPGPartitionMetaInfo partition_meta_info;
DEBUG_SYNC(BACKUP_BEFROE_BUILD_TABLE_PARTITION_INFO);
if (OB_UNLIKELY(!is_inited_)) {
ret = OB_NOT_INIT;
LOG_WARN("migrate prepare task do not init", K(ret));
......@@ -1572,6 +1574,7 @@ int ObBackupPrepareTask::build_table_partition_info(
}
}
}
return ret;
}
......
......@@ -6037,17 +6037,7 @@ int ObPartitionService::backup_replica_batch(const obrpc::ObBackupBatchArg& arg)
replica_op_arg.cluster_id_ = GCONF.cluster_id;
replica_op_arg.type_ = type;
replica_op_arg.switch_epoch_ = single_arg.switch_epoch_;
ObIPartitionGroupGuard guard;
ObIPartitionGroup* partition = NULL;
if (OB_FAIL(get_partition(single_arg.key_, guard))) {
STORAGE_LOG(WARN, "get partition failed", K(single_arg), K(ret));
} else if (OB_ISNULL(guard.get_partition_group())) {
ret = OB_ENTRY_NOT_EXIST;
STORAGE_LOG(WARN, "partition not exist, maybe migrate out", K(single_arg), K(ret));
} else if (OB_ISNULL(partition = guard.get_partition_group())) {
ret = OB_ERR_UNEXPECTED;
STORAGE_LOG(WARN, "partition should not be NULL", K(ret), K(single_arg));
} else if (OB_FAIL(task_list.push_back(replica_op_arg))) {
if (OB_FAIL(task_list.push_back(replica_op_arg))) {
LOG_WARN("failed to push replica op arg into array", K(ret), K(replica_op_arg));
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册