[fix] arbitration_service prints WDIAG logs when there is no arb member
This commit is contained in:
@ -426,8 +426,9 @@ int LogConfigInfo::get_expected_paxos_memberlist(common::ObMemberList &paxos_mem
|
|||||||
if (false == log_sync_memberlist_.is_valid() ||
|
if (false == log_sync_memberlist_.is_valid() ||
|
||||||
0 >= log_sync_replica_num_ ||
|
0 >= log_sync_replica_num_ ||
|
||||||
common::OB_MAX_MEMBER_NUMBER < log_sync_replica_num_) {
|
common::OB_MAX_MEMBER_NUMBER < log_sync_replica_num_) {
|
||||||
ret = OB_NOT_INIT;
|
// memberlist may be empty when bootstraping cluster, just return empty memberlist
|
||||||
PALF_LOG(WARN, "LogConfigInfo not init", KR(ret), K_(log_sync_memberlist), K_(log_sync_replica_num));
|
paxos_memberlist.reset();
|
||||||
|
paxos_replica_num = 0;
|
||||||
} else if (OB_UNLIKELY(degraded_learnerlist_.is_valid())) {
|
} else if (OB_UNLIKELY(degraded_learnerlist_.is_valid())) {
|
||||||
paxos_memberlist = log_sync_memberlist_;
|
paxos_memberlist = log_sync_memberlist_;
|
||||||
paxos_replica_num = log_sync_replica_num_;
|
paxos_replica_num = log_sync_replica_num_;
|
||||||
|
|||||||
@ -3715,6 +3715,7 @@ int PalfHandleImpl::inner_flashback(const share::SCN &flashback_scn)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO by yunlong: this function needs refactoring in 4.2.0.0
|
||||||
int PalfHandleImpl::get_ack_info_array(LogMemberAckInfoList &ack_info_array,
|
int PalfHandleImpl::get_ack_info_array(LogMemberAckInfoList &ack_info_array,
|
||||||
common::GlobalLearnerList °raded_list) const
|
common::GlobalLearnerList °raded_list) const
|
||||||
{
|
{
|
||||||
@ -3722,11 +3723,16 @@ int PalfHandleImpl::get_ack_info_array(LogMemberAckInfoList &ack_info_array,
|
|||||||
RLockGuard guard(lock_);
|
RLockGuard guard(lock_);
|
||||||
const bool is_leader = (state_mgr_.is_leader_active() ||
|
const bool is_leader = (state_mgr_.is_leader_active() ||
|
||||||
(state_mgr_.is_leader_reconfirm() && reconfirm_.can_do_degrade()));
|
(state_mgr_.is_leader_reconfirm() && reconfirm_.can_do_degrade()));
|
||||||
|
common::ObMember arb_member;
|
||||||
|
config_mgr_.get_arbitration_member(arb_member);
|
||||||
|
const bool need_degrade_or_upgrade = arb_member.is_valid();
|
||||||
if (IS_NOT_INIT) {
|
if (IS_NOT_INIT) {
|
||||||
ret = OB_NOT_INIT;
|
ret = OB_NOT_INIT;
|
||||||
PALF_LOG(WARN, "PalfHandleImpl not inited!!!", K(ret));
|
PALF_LOG(WARN, "PalfHandleImpl not inited!!!", K(ret));
|
||||||
} else if (false == is_leader) {
|
} else if (false == is_leader) {
|
||||||
ret = OB_NOT_MASTER;
|
ret = OB_NOT_MASTER;
|
||||||
|
} else if (false == need_degrade_or_upgrade) {
|
||||||
|
// do not need degrade or upgrade, skip
|
||||||
} else if (OB_FAIL(sw_.get_ack_info_array(ack_info_array))) {
|
} else if (OB_FAIL(sw_.get_ack_info_array(ack_info_array))) {
|
||||||
PALF_LOG(WARN, "get_ack_info_array failed", K(ret), KPC(this));
|
PALF_LOG(WARN, "get_ack_info_array failed", K(ret), KPC(this));
|
||||||
} else if (OB_FAIL(config_mgr_.get_degraded_learner_list(degraded_list))) {
|
} else if (OB_FAIL(config_mgr_.get_degraded_learner_list(degraded_list))) {
|
||||||
|
|||||||
Reference in New Issue
Block a user