[CP] Fix batch create partitions rollback core
This commit is contained in:
committed by
wangzelin.wzl
parent
8ce40d33af
commit
25b3b3fff8
@ -3148,7 +3148,7 @@ int ObPartitionGroup::check_can_do_merge(bool& can_merge, bool& need_merge)
|
|||||||
ObReplicaType ObPartitionGroup::get_replica_type() const
|
ObReplicaType ObPartitionGroup::get_replica_type() const
|
||||||
{
|
{
|
||||||
int tmp_ret = OB_SUCCESS;
|
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))) {
|
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));
|
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 ObPGStorage::get_replica_type(common::ObReplicaType& replica_type) const
|
||||||
{
|
{
|
||||||
int ret = OB_SUCCESS;
|
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_);
|
TCRLockGuard lock_guard(lock_);
|
||||||
replica_type = meta_->replica_type_;
|
replica_type = meta_->replica_type_;
|
||||||
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user