mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
MDEV-34543 Shutdown hangs while freeing the asynchronous i/o slots
Problem: ======== - During shutdown, InnoDB tries to free the asynchronous I/O slots and hangs. The reason is that InnoDB disables asynchronous I/O before waiting for pending asynchronous I/O to finish. buf_load(): InnoDB aborts the buffer pool load due to user requested shutdown and doesn't wait for the asynchronous read to get completed. This could lead to debug assertion in buf_flush_buffer_pool() during shutdown Fix: === os_aio_free(): Should wait all read_slots and write_slots to finish before disabling the aio. buf_load(): Should wait for pending read request to complete even though it was aborted.
This commit is contained in:
parent
e8bcc4e455
commit
3662f8ca89
2 changed files with 2 additions and 4 deletions
|
@ -643,9 +643,7 @@ buf_load()
|
|||
|
||||
ut_free(dump);
|
||||
|
||||
if (i == dump_n) {
|
||||
os_aio_wait_until_no_pending_reads();
|
||||
}
|
||||
os_aio_wait_until_no_pending_reads();
|
||||
|
||||
ut_sprintf_timestamp(now);
|
||||
|
||||
|
|
|
@ -3752,11 +3752,11 @@ disable:
|
|||
|
||||
void os_aio_free()
|
||||
{
|
||||
srv_thread_pool->disable_aio();
|
||||
delete read_slots;
|
||||
delete write_slots;
|
||||
read_slots= nullptr;
|
||||
write_slots= nullptr;
|
||||
srv_thread_pool->disable_aio();
|
||||
}
|
||||
|
||||
/** Wait until there are no pending asynchronous writes. */
|
||||
|
|
Loading…
Reference in a new issue