[MDS] fix mds_ctx must call on_abort bug when destroy

This commit is contained in:
fengdeyiji 2023-07-03 08:18:13 +00:00 committed by ob-robot
parent 07ed0009fd
commit 4cc2f4b53b
2 changed files with 3 additions and 2 deletions

View File

@ -33,8 +33,9 @@ MdsCtx::~MdsCtx()
bool list_empty = false;
{
MdsWLockGuard lg(lock_);
bool list_empty = write_list_.empty();
list_empty = write_list_.empty();
if (!list_empty) {
OB_ASSERT(state_ != TwoPhaseCommitState::ON_COMMIT);// if decided, list is empty
MDS_LOG_RET(INFO, OB_SUCCESS, "nodes not commit or abort when mds ctx destroyed", K(*this));
}
}

View File

@ -131,8 +131,8 @@ int ObSyncTabletSeqMdsLogCb::on_success()
{
int ret = OB_SUCCESS;
ret_code_ = ret;
state_ = STATE_SUCCESS;
mds_ctx_.single_log_commit(__get_scn(), __get_scn());
state_ = STATE_SUCCESS;
try_release();
return ret;
}