MDEV-36465 MDEV-33813 Regression, Queries in 'Waiting for someone to free space' state will not automatically retry IO and hang forever
MDEV-33813 caused a regressing in that when a disk got full when writing to a MyISAM or Aria table the MariaDB connection would, instead of doing a retry after 60 seconds, hang until the query was killed. Fixed by changing mysql_coind_wait() top mysql_cond_timedwait() Author: Thomas Stangner
This commit is contained in:
parent
0a91bbdc41
commit
643319a7fb
@ -8509,16 +8509,19 @@ void mariadb_sleep_for_space(unsigned int seconds)
|
|||||||
{
|
{
|
||||||
THD *thd= current_thd;
|
THD *thd= current_thd;
|
||||||
PSI_stage_info old_stage;
|
PSI_stage_info old_stage;
|
||||||
|
struct timespec abstime;
|
||||||
if (!thd)
|
if (!thd)
|
||||||
{
|
{
|
||||||
sleep(seconds);
|
sleep(seconds);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
mysql_mutex_lock(&thd->LOCK_wakeup_ready);
|
set_timespec(abstime, seconds);
|
||||||
|
mysql_mutex_lock(&thd->LOCK_wakeup_ready);
|
||||||
thd->ENTER_COND(&thd->COND_wakeup_ready, &thd->LOCK_wakeup_ready,
|
thd->ENTER_COND(&thd->COND_wakeup_ready, &thd->LOCK_wakeup_ready,
|
||||||
&stage_waiting_for_disk_space, &old_stage);
|
&stage_waiting_for_disk_space, &old_stage);
|
||||||
if (!thd->killed)
|
if (!thd->killed)
|
||||||
mysql_cond_wait(&thd->COND_wakeup_ready, &thd->LOCK_wakeup_ready);
|
mysql_cond_timedwait(&thd->COND_wakeup_ready, &thd->LOCK_wakeup_ready,
|
||||||
|
&abstime);
|
||||||
thd->EXIT_COND(&old_stage);
|
thd->EXIT_COND(&old_stage);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user