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.
This commit is contained in:
parent
2ba6f3d46a
commit
8bccba1d4a
@ -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",
|
DBUG_PRINT("quit",("Informing thread %lld that it's time to die",
|
||||||
(longlong) thd->thread_id));
|
(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",
|
WSREP_DEBUG("Informing thread %lld that it's time to die",
|
||||||
thd->thread_id);
|
thd->thread_id);
|
||||||
@ -2807,7 +2809,7 @@ static my_bool have_client_connections(THD *thd, void*)
|
|||||||
|
|
||||||
static void wsrep_close_thread(THD *thd)
|
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_CALLBACK(thread_scheduler, post_kill_notification, (thd));
|
||||||
mysql_mutex_lock(&thd->LOCK_thd_kill);
|
mysql_mutex_lock(&thd->LOCK_thd_kill);
|
||||||
thd->abort_current_cond_wait(true);
|
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_client_connection(thd) && thd != caller_thd)
|
||||||
{
|
{
|
||||||
if (is_replaying_connection(thd))
|
if (is_replaying_connection(thd))
|
||||||
thd->set_killed(KILL_CONNECTION);
|
thd->set_killed(KILL_CONNECTION_HARD);
|
||||||
else if (!abort_replicated(thd))
|
else if (!abort_replicated(thd))
|
||||||
{
|
{
|
||||||
/* replicated transactions must be skipped */
|
/* replicated transactions must be skipped */
|
||||||
WSREP_DEBUG("closing connection %lld", (longlong) thd->thread_id);
|
WSREP_DEBUG("closing connection %lld", (longlong) thd->thread_id);
|
||||||
/* instead of wsrep_close_thread() we do now soft kill by THD::awake */
|
/* instead of wsrep_close_thread() we do now soft kill by THD::awake */
|
||||||
thd->awake(KILL_CONNECTION);
|
thd->awake(KILL_CONNECTION_HARD);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user