[BUG] donnot reset pending count when resume

This commit is contained in:
Handora
2022-11-21 07:27:20 +00:00
committed by wangzelin.wzl
parent d9d65a329f
commit cd2a883c13
4 changed files with 10 additions and 10 deletions

View File

@ -590,21 +590,21 @@ int ObMemtableCtx::trans_replay_end(const bool commit,
}
//leader takeover actions
int ObMemtableCtx::replay_to_commit()
int ObMemtableCtx::replay_to_commit(const bool is_resume)
{
int ret = OB_SUCCESS;
ATOMIC_STORE(&is_master_, true);
ObByteLockGuard guard(lock_);
trans_mgr_.set_for_replay(false);
trans_mgr_.clear_pending_log_size();
if (!is_resume) {
trans_mgr_.clear_pending_log_size();
}
if (OB_FAIL(reuse_log_generator_())) {
TRANS_LOG(ERROR, "fail to reset log generator", K(ret));
} else {
// do nothing
}
if (OB_SUCCESS == ret) {
TRANS_LOG(INFO, "replay to commit success", K(this));
} else {
if (OB_FAIL(ret)) {
TRANS_LOG(ERROR, "replay to commit failed", K(ret), K(this));
}
return ret;