[master] do not abort tx-ctx when switch to leader fail

This commit is contained in:
chinaxing
2023-01-09 07:42:08 +00:00
committed by ob-robot
parent 64818a5086
commit 7995b881c2
11 changed files with 71 additions and 16 deletions

View File

@ -74,7 +74,10 @@ int MockOb2pcCtx::commit(const MockObParticipants& participants)
participants_.assign(participants.begin(), participants.end());
return two_phase_commit();
}
int MockOb2pcCtx::do_prepare_redo()
{
return OB_SUCCESS;
}
int MockOb2pcCtx::do_prepare(bool &no_need_submit_log)
{
no_need_submit_log = false;

View File

@ -94,6 +94,7 @@ protected:
// decide final transaction state. In Oceanbase's optimized, do_pre_commit is used to
// optimize single machine read latency and do/on_clear is used to maintain the state
// to recovery
virtual int do_prepare_redo() override;
virtual int do_prepare(bool &no_need_submit_log) override;
virtual int on_prepare() override;
virtual int do_pre_commit(bool& need_wait) override;