mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-28 20:02:00 +03:00
Fix NBO error handling
- Set both current error and current error status if provider enter_toi() or leave_toi() fails. - Leave NBO mode if TOI cannot be entered in begin_nbo_phase_two().
This commit is contained in:
@ -516,8 +516,7 @@ int wsrep::client_state::begin_nbo_phase_one(
|
||||
ret= 0;
|
||||
break;
|
||||
default:
|
||||
override_error(e_deadlock_error);
|
||||
current_error_status_ = status;
|
||||
override_error(e_deadlock_error, status);
|
||||
if (!toi_meta_.seqno().is_undefined())
|
||||
{
|
||||
// TODO(leandro): do we need to pass sth here? is leave_toi necessary here? enter_toi_local doesn't do it.
|
||||
@ -548,7 +547,7 @@ int wsrep::client_state::end_nbo_phase_one(const wsrep::mutable_buffer& err)
|
||||
ret = 0;
|
||||
break;
|
||||
default:
|
||||
current_error_status_ = status;
|
||||
override_error(e_error_during_commit, status);
|
||||
ret = 1;
|
||||
break;
|
||||
}
|
||||
@ -596,7 +595,11 @@ int wsrep::client_state::begin_nbo_phase_two()
|
||||
toi_mode_ = m_local;
|
||||
break;
|
||||
default:
|
||||
current_error_status_ = status;
|
||||
override_error(e_error_during_commit, status);
|
||||
// Failed to grab TOI for completing NBO in order. This means that
|
||||
// the operation cannot be ended in total order, so we end the
|
||||
// NBO mode and let the DBMS to deal with the error.
|
||||
mode(lock, m_local);
|
||||
ret= 1;
|
||||
break;
|
||||
}
|
||||
@ -621,7 +624,7 @@ int wsrep::client_state::end_nbo_phase_two(const wsrep::mutable_buffer& err)
|
||||
ret = 0;
|
||||
break;
|
||||
default:
|
||||
current_error_status_ = status;
|
||||
override_error(e_error_during_commit, status);
|
||||
ret = 1;
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user