1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-07-28 20:02:00 +03:00

Ensure that client_service::will_replay() is called.

Modified tests to verify that client_service::will_replay() is
called whenever it is determined that the transaction must replay.

Added a test to verify behavior when provider::commit_order_enter()
returns BF abort error.

Moved call to client_service::will_replay() into transaction::state()
to ensure that it is always called when shift to s_must_replay
happens.
This commit is contained in:
Teemu Ollakka
2020-10-19 06:12:17 +03:00
parent ec767cd3f0
commit d1482feb32
4 changed files with 61 additions and 5 deletions

View File

@ -1142,6 +1142,11 @@ void wsrep::transaction::state(
state_hist_.erase(state_hist_.begin());
}
state_ = next_state;
if (state_ == s_must_replay)
{
client_service_.will_replay();
}
}
bool wsrep::transaction::abort_or_interrupt(
@ -1531,7 +1536,6 @@ int wsrep::transaction::certify_commit(
// We got BF aborted after succesful certification
// and before acquiring client state lock. The trasaction
// must be replayed.
client_service_.will_replay();
state(lock, s_must_replay);
break;
default:
@ -1557,7 +1561,6 @@ int wsrep::transaction::certify_commit(
// yet known. Therefore the transaction must roll back
// and go through replay either to replay and commit the whole
// transaction or to determine failed certification status.
client_service_.will_replay();
if (state() != s_must_abort)
{
state(lock, s_must_abort);