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

codership/wsrep-lib#135 Fix wrong assertion in before_command().

An assertion

  `server_state_.rollback_mode() == wsrep::server_state::rm_async`

fired in `client_state::before_command()` if a BF abort happened
between calls to wait_rollback_complete_and_acquire_ownership()
and before_command().

This commit adds a test to reproduce the assertion and verify
the correct behavior, as well as removes the incorrect assertion
to fix the issue.
This commit is contained in:
Teemu Ollakka
2020-07-23 22:05:43 +03:00
parent 8ba574f7bf
commit 3e5a28df32
2 changed files with 32 additions and 2 deletions

View File

@ -117,8 +117,6 @@ int wsrep::client_state::before_command()
{
if (transaction_.state() == wsrep::transaction::s_must_abort)
{
assert(server_state_.rollback_mode() ==
wsrep::server_state::rm_async);
override_error(wsrep::e_deadlock_error);
lock.unlock();
client_service_.bf_rollback();