reorder replay status switch to follower process

This commit is contained in:
obdev
2023-02-08 20:23:55 +08:00
committed by ob-robot
parent a8b707b8c0
commit bd393d0458
5 changed files with 51 additions and 43 deletions

View File

@ -1006,10 +1006,10 @@ int ObLogHandler::pend_submit_replay_log()
if (IS_NOT_INIT) {
ret = OB_NOT_INIT;
} else if (FALSE_IT(id = id_)) {
} else if (OB_FAIL(replay_service_->set_submit_log_pending(id))) {
CLOG_LOG(WARN, "failed to set_submit_log_pending", K(ret), K(id));
} else if (OB_FAIL(replay_service_->block_submit_log(id))) {
CLOG_LOG(WARN, "failed to block_submit_log", K(ret), K(id));
} else {
CLOG_LOG(INFO, "set_submit_log_pending success", K(ret), K(id));
CLOG_LOG(INFO, "block_submit_log success", K(ret), K(id));
}
return ret;
}
@ -1022,10 +1022,10 @@ int ObLogHandler::restore_submit_replay_log()
if (IS_NOT_INIT) {
ret = OB_NOT_INIT;
} else if (FALSE_IT(id = id_)) {
} else if (OB_FAIL(replay_service_->erase_submit_log_pending(id))) {
CLOG_LOG(WARN, "failed to erase_submit_log_pending", K(ret), K(id));
} else if (OB_FAIL(replay_service_->unblock_submit_log(id))) {
CLOG_LOG(WARN, "failed to unblock_submit_log", K(ret), K(id));
} else {
CLOG_LOG(INFO, "erase_submit_log_pending success", K(ret), K(id));
CLOG_LOG(INFO, "unblock_submit_log success", K(ret), K(id));
}
return ret;
}