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

Incorrect assertion and state handling in after_replay().

If the transaction fails during replay because of certification
failure, the provider will return control to applier without
terminating the transaction and transaction remains in
s_replaying.

Fixed transaction::after_statement() to handle the state changes
correctly if certification failure is returned from replay.
Replaying was extracted to separate private method from
after_statement(). Removed transaction::after_replay() as it
seems now unnecessary and it bypassed state change sanity checks.

Allowed replaying -> committed transaction transition to handle
the situation where DBMS allocates a new context and client_state
to do the replay.
This commit is contained in:
Teemu Ollakka
2019-12-27 18:27:16 +02:00
parent 90157ed1b0
commit 76f7249b8d
3 changed files with 59 additions and 55 deletions

View File

@ -640,8 +640,6 @@ namespace wsrep
/**
* Clone enough state from another transaction so that replaing will
* be possible with a transaction contained in this client state.
* Method after_replay() must be used to inject the state after
* replaying back to this client state.
*
* @param transaction Transaction which is to be replied in this
* client state
@ -652,16 +650,6 @@ namespace wsrep
transaction_.clone_for_replay(transaction);
}
/**
* Copy state from another transaction context after replay.
*
* @param transaction Transaction which was used for replaying.
*/
void after_replay(const wsrep::transaction& transaction)
{
transaction_.after_replay(transaction);
}
/** @name Non-transactional operations */
/** @{*/