fixed ObGCLSLog on success failed.

This commit is contained in:
HaHaJeff
2024-03-21 11:15:37 +00:00
committed by ob-robot
parent 1e9d2ee7a4
commit b2ee0cfec5

View File

@ -359,16 +359,14 @@ DEFINE_GET_SERIALIZE_SIZE(ObGCLSLog)
int ObGCHandler::ObGCLSLogCb::on_success() int ObGCHandler::ObGCLSLogCb::on_success()
{ {
int ret = OB_SUCCESS; int tmp_ret = OB_SUCCESS;
if (OB_ISNULL(handler_) || !scn_.is_valid()) { if (OB_ISNULL(handler_)) {
CLOG_LOG_RET(ERROR, OB_INVALID_ARGUMENT, "gc handler is NULL or scn is invalid", K(handler_), K(scn_)); tmp_ret = OB_ERR_UNEXPECTED;
CLOG_LOG_RET(ERROR, OB_ERR_UNEXPECTED, "handler_ is nullptr, unexpected!!!", KP(handler_), K_(state), K(tmp_ret));
} else if (OB_SUCCESS != (tmp_ret = handler_->handle_on_success_cb(*this))) {
CLOG_LOG_RET(ERROR, OB_ERR_UNEXPECTED, "failed to handle_on_success_cb", K(this), K(tmp_ret));
} else { } else {
int tmp_ret = OB_SUCCESS; ATOMIC_STORE(&state_, CbState::STATE_SUCCESS);
if (OB_SUCCESS != (tmp_ret = handler_->handle_on_success_cb(*this))) {
CLOG_LOG(ERROR, "failed to handle_on_success_cb", K(this), K(tmp_ret));
} else {
ATOMIC_STORE(&state_, CbState::STATE_SUCCESS);
}
} }
return OB_SUCCESS; return OB_SUCCESS;
} }