Commit 8bccba1d authored by Jan Lindström's avatar Jan Lindström

MDEV-30465 : Galera test galera_sr.MDEV-27615 takes 5mins

After d7d3ad69 we should use KILL_CONNECTION_HARD to interrupt
debug_sync waits. Test case uses debug_sync and then disconnects
connection from cluster.
parent 2ba6f3d4
......@@ -2795,7 +2795,9 @@ static my_bool have_client_connections(THD *thd, void*)
{
DBUG_PRINT("quit",("Informing thread %lld that it's time to die",
(longlong) thd->thread_id));
if (is_client_connection(thd) && thd->killed == KILL_CONNECTION)
if (is_client_connection(thd) &&
(thd->killed == KILL_CONNECTION ||
thd->killed == KILL_CONNECTION_HARD))
{
WSREP_DEBUG("Informing thread %lld that it's time to die",
thd->thread_id);
......@@ -2807,7 +2809,7 @@ static my_bool have_client_connections(THD *thd, void*)
static void wsrep_close_thread(THD *thd)
{
thd->set_killed(KILL_CONNECTION);
thd->set_killed(KILL_CONNECTION_HARD);
MYSQL_CALLBACK(thread_scheduler, post_kill_notification, (thd));
mysql_mutex_lock(&thd->LOCK_thd_kill);
thd->abort_current_cond_wait(true);
......@@ -2843,13 +2845,13 @@ static my_bool kill_all_threads(THD *thd, THD *caller_thd)
if (is_client_connection(thd) && thd != caller_thd)
{
if (is_replaying_connection(thd))
thd->set_killed(KILL_CONNECTION);
thd->set_killed(KILL_CONNECTION_HARD);
else if (!abort_replicated(thd))
{
/* replicated transactions must be skipped */
WSREP_DEBUG("closing connection %lld", (longlong) thd->thread_id);
/* instead of wsrep_close_thread() we do now soft kill by THD::awake */
thd->awake(KILL_CONNECTION);
thd->awake(KILL_CONNECTION_HARD);
}
}
return 0;
......
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