fix try_update_epoch_and_reload in case of ObRole::LEADER != role

This commit is contained in:
LiefB 2023-05-09 18:48:27 +00:00 committed by ob-robot
parent 28a864535f
commit 6f318f70d3
2 changed files with 4 additions and 1 deletions

View File

@ -102,7 +102,7 @@ void ObFreezeInfoDetector::run3()
if (OB_FAIL(obtain_proposal_id_from_ls(is_primary_service_, proposal_id, role))) {
LOG_WARN("fail to obtain proposal_id from ls", KR(ret));
} else if (ObRole::FOLLOWER == role) {
} else if (ObRole::LEADER != role) {
LOG_INFO("follower should not run freeze_info_detector", K_(tenant_id), K(role),
K_(is_primary_service));
} else if (OB_FAIL(can_start_work(can_work))) {

View File

@ -781,6 +781,9 @@ int ObMajorMergeScheduler::try_update_epoch_and_reload()
ret = OB_ERR_UNEXPECTED;
LOG_WARN("latest epoch should not less than cached epoch", KR(ret), K(latest_epoch), "cached_epoch", get_epoch());
}
} else { // ObRole::LEADER != role
ret = OB_NOT_MASTER;
LOG_INFO("not master ls", KR(ret), K(role), "cur_epoch", get_epoch(), K(latest_epoch));
}
return ret;
}