提交 25b3b3ff 编写于 作者: J JiahuaChen 提交者: wangzelin.wzl

[CP] Fix batch create partitions rollback core

上级 8ce40d33
......@@ -3148,7 +3148,7 @@ int ObPartitionGroup::check_can_do_merge(bool& can_merge, bool& need_merge)
ObReplicaType ObPartitionGroup::get_replica_type() const
{
int tmp_ret = OB_SUCCESS;
ObReplicaType replica_type;
ObReplicaType replica_type = ObReplicaType::REPLICA_TYPE_MAX;
if (OB_SUCCESS != (tmp_ret = pg_storage_.get_replica_type(replica_type))) {
STORAGE_LOG(WARN, "get replica_type error", K(tmp_ret), K_(pkey), K(replica_type));
......
......@@ -2249,8 +2249,13 @@ ObReplicaType ObPGStorage::get_replica_type_() const
int ObPGStorage::get_replica_type(common::ObReplicaType& replica_type) const
{
int ret = OB_SUCCESS;
if (!is_inited_) {
ret = OB_NOT_INIT;
STORAGE_LOG(WARN, "partition is not initialized", K_(pkey), K(ret));
} else {
TCRLockGuard lock_guard(lock_);
replica_type = meta_->replica_type_;
}
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册