[CP] Fix batch create partitions rollback core

This commit is contained in:
JiahuaChen
2022-04-25 14:20:31 +08:00
committed by wangzelin.wzl
parent 8ce40d33af
commit 25b3b3fff8
2 changed files with 8 additions and 3 deletions

View File

@ -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));

View File

@ -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;
}