mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-28 20:02:00 +03:00
Handle disconnecting state in on_sync()
When disconnecting from the group, the sync event from the provider must not change the state back to synced.
This commit is contained in:
@ -1051,6 +1051,8 @@ void wsrep::server_state::on_sync()
|
||||
{
|
||||
switch (state_)
|
||||
{
|
||||
case s_disconnecting:
|
||||
break;
|
||||
case s_synced:
|
||||
break;
|
||||
case s_connected: // Seed node path: provider becomes
|
||||
@ -1077,7 +1079,7 @@ void wsrep::server_state::on_sync()
|
||||
// Calls to on_sync() in synced state are possible if
|
||||
// server desyncs itself from the group. Provider does not
|
||||
// inform about this through callbacks.
|
||||
if (state_ != s_synced)
|
||||
if (state_ != s_synced && state_ != s_disconnecting)
|
||||
{
|
||||
state(lock, s_synced);
|
||||
}
|
||||
|
Reference in New Issue
Block a user