Commit f3f09def authored by Jan Lindström's avatar Jan Lindström

Merge branch 'codership-10.4-fix-sst_received' into bb-10.4-MDEV-30419

parents afb5deb9 b2b9d916
...@@ -915,13 +915,19 @@ void wsrep_init_startup (bool sst_first) ...@@ -915,13 +915,19 @@ void wsrep_init_startup (bool sst_first)
With mysqldump SST (!sst_first) wait until the server reaches With mysqldump SST (!sst_first) wait until the server reaches
joiner state and procedd to accepting connections. joiner state and procedd to accepting connections.
*/ */
int err= 0;
if (sst_first) if (sst_first)
{ {
server_state.wait_until_state(Wsrep_server_state::s_initializing); err= server_state.wait_until_state(Wsrep_server_state::s_initializing);
} }
else else
{ {
server_state.wait_until_state(Wsrep_server_state::s_joiner); err= server_state.wait_until_state(Wsrep_server_state::s_joiner);
}
if (err)
{
WSREP_ERROR("Wsrep startup was interrupted");
unireg_abort(1);
} }
} }
...@@ -1016,7 +1022,11 @@ void wsrep_stop_replication(THD *thd) ...@@ -1016,7 +1022,11 @@ void wsrep_stop_replication(THD *thd)
{ {
WSREP_DEBUG("Disconnect provider"); WSREP_DEBUG("Disconnect provider");
Wsrep_server_state::instance().disconnect(); Wsrep_server_state::instance().disconnect();
Wsrep_server_state::instance().wait_until_state(Wsrep_server_state::s_disconnected); if (Wsrep_server_state::instance().wait_until_state(
Wsrep_server_state::s_disconnected))
{
WSREP_WARN("Wsrep interrupted while waiting for disconnected state");
}
} }
/* my connection, should not terminate with wsrep_close_client_connection(), /* my connection, should not terminate with wsrep_close_client_connection(),
...@@ -1038,7 +1048,11 @@ void wsrep_shutdown_replication() ...@@ -1038,7 +1048,11 @@ void wsrep_shutdown_replication()
{ {
WSREP_DEBUG("Disconnect provider"); WSREP_DEBUG("Disconnect provider");
Wsrep_server_state::instance().disconnect(); Wsrep_server_state::instance().disconnect();
Wsrep_server_state::instance().wait_until_state(Wsrep_server_state::s_disconnected); if (Wsrep_server_state::instance().wait_until_state(
Wsrep_server_state::s_disconnected))
{
WSREP_WARN("Wsrep interrupted while waiting for disconnected state");
}
} }
wsrep_close_client_connections(TRUE); wsrep_close_client_connections(TRUE);
......
...@@ -336,9 +336,14 @@ static bool wsrep_sst_complete (THD* thd, ...@@ -336,9 +336,14 @@ static bool wsrep_sst_complete (THD* thd,
if ((state == Wsrep_server_state::s_joiner || if ((state == Wsrep_server_state::s_joiner ||
state == Wsrep_server_state::s_initialized)) state == Wsrep_server_state::s_initialized))
{ {
Wsrep_server_state::instance().sst_received(client_service, if (Wsrep_server_state::instance().sst_received(client_service, rcode))
rcode); {
WSREP_INFO("SST succeeded for position %s", start_pos_buf); failed= true;
}
else
{
WSREP_INFO("SST succeeded for position %s", start_pos_buf);
}
} }
else else
{ {
......
Subproject commit f8ff2cfdd4c6424ffd96fc53bcc0f2e1d9ffe137 Subproject commit 275a0af8c5b92f0ee33cfe9e23f3db5f59b56e9d
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment