mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-28 20:02:00 +03:00
Lost e_error_during_commit if fragment size exceeds maximum size
If the size of a SR fragment exceeds the maximum size that the replication provider allows us to replicate, then we are expected to set the client error code to e_error_during_commit. However, client_state::after_statement() unconditionally overrides it to error e_deadlock_error. Fixes client_state::after_statement() so that it overrided the error only if noerror has been set yet.
This commit is contained in:
@ -224,8 +224,14 @@ int wsrep::client_state::after_statement()
|
|||||||
client_service_.bf_rollback();
|
client_service_.bf_rollback();
|
||||||
lock.lock();
|
lock.lock();
|
||||||
assert(transaction_.state() == wsrep::transaction::s_aborted);
|
assert(transaction_.state() == wsrep::transaction::s_aborted);
|
||||||
|
// Error may be set already. For example, if fragment size
|
||||||
|
// exceeded the maximum size in certify_fragment(), then
|
||||||
|
// we already have wsrep::e_error_during_commit
|
||||||
|
if (current_error() == wsrep::e_success)
|
||||||
|
{
|
||||||
override_error(wsrep::e_deadlock_error);
|
override_error(wsrep::e_deadlock_error);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
lock.unlock();
|
lock.unlock();
|
||||||
|
|
||||||
(void)transaction_.after_statement();
|
(void)transaction_.after_statement();
|
||||||
|
Reference in New Issue
Block a user