mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-28 20:02:00 +03:00
It may happen so that disconnect() is called in s_joined state just an
instance before the SYNCED event is delivered. Thus wsrep-lib is already in s_disconnecting state but still will transition to s_synced albeit with a warning. This is pointless and possibly harmful. If we are disconnecting ignore any remaining state events from the replication queue. Refs codership/wsrep-lib#251
This commit is contained in:
@ -1364,6 +1364,10 @@ void wsrep::server_state::state(
|
|||||||
|
|
||||||
if (allowed[state_][state] == false)
|
if (allowed[state_][state] == false)
|
||||||
{
|
{
|
||||||
|
/* If we are disconnecting ignore any remaining state events from
|
||||||
|
* the replication queue */
|
||||||
|
if (s_disconnecting == state_) return;
|
||||||
|
|
||||||
std::ostringstream os;
|
std::ostringstream os;
|
||||||
os << "server: " << name_ << " unallowed state transition: "
|
os << "server: " << name_ << " unallowed state transition: "
|
||||||
<< wsrep::to_string(state_) << " -> " << wsrep::to_string(state);
|
<< wsrep::to_string(state_) << " -> " << wsrep::to_string(state);
|
||||||
|
Reference in New Issue
Block a user