1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-07-27 09:01:50 +03:00

Remove calls to client_service::will_replay()

Method client_service::will_replay() is now called whenever the
transaction state changes to s_must_replay, in transaction::state().
This commit is contained in:
Daniele Sciascia
2020-10-27 09:40:42 +01:00
parent a2221567ab
commit 3f449c6318

View File

@ -422,7 +422,6 @@ int wsrep::transaction::after_prepare(
if (state() == s_must_abort) if (state() == s_must_abort)
{ {
assert(client_state_.mode() == wsrep::client_state::m_local); assert(client_state_.mode() == wsrep::client_state::m_local);
client_service_.will_replay();
state(lock, s_must_replay); state(lock, s_must_replay);
ret = 1; ret = 1;
} }
@ -470,7 +469,6 @@ int wsrep::transaction::before_commit()
if (certified() || if (certified() ||
(is_xa() && is_streaming())) (is_xa() && is_streaming()))
{ {
client_service_.will_replay();
state(lock, s_must_replay); state(lock, s_must_replay);
} }
else else
@ -509,7 +507,6 @@ int wsrep::transaction::before_commit()
case wsrep::provider::success: case wsrep::provider::success:
break; break;
case wsrep::provider::error_bf_abort: case wsrep::provider::error_bf_abort:
client_service_.will_replay();
if (state() != s_must_abort) if (state() != s_must_abort)
{ {
state(lock, s_must_abort); state(lock, s_must_abort);
@ -695,7 +692,6 @@ int wsrep::transaction::before_rollback()
case s_must_abort: case s_must_abort:
if (certified()) if (certified())
{ {
client_service_.will_replay();
state(lock, s_must_replay); state(lock, s_must_replay);
} }
else else
@ -1023,7 +1019,6 @@ bool wsrep::transaction::bf_abort(
// rollbacker gets control. // rollbacker gets control.
if (is_xa() && state_at_enter == s_prepared) if (is_xa() && state_at_enter == s_prepared)
{ {
client_service_.will_replay();
state(lock, s_must_replay); state(lock, s_must_replay);
client_state_.set_rollbacker_active(true); client_state_.set_rollbacker_active(true);
} }
@ -1642,7 +1637,6 @@ int wsrep::transaction::certify_commit(
{ {
if (is_xa() && state() == s_must_abort) if (is_xa() && state() == s_must_abort)
{ {
client_service_.will_replay();
state(lock, s_must_replay); state(lock, s_must_replay);
} }
return 1; return 1;
@ -1768,7 +1762,6 @@ int wsrep::transaction::certify_commit(
{ {
if (is_xa()) if (is_xa())
{ {
client_service_.will_replay();
state(lock, s_must_replay); state(lock, s_must_replay);
} }
client_state_.override_error(wsrep::e_deadlock_error); client_state_.override_error(wsrep::e_deadlock_error);