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:
@ -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 */
|
||||
/** @{*/
|
||||
|
||||
|
Reference in New Issue
Block a user