MDEV-34845 buf_flush_buffer_pool(): Assertion `!os_aio_pending_reads()' failed

buf_flush_buffer_pool(): Wait for any pending asynchronous reads
to complete. This assertion failed in a run where buf_read_ahead_linear()
had been triggered in an SQL statement that was executed right
before shutdown.

Reviewed by: Debarun Banerjee
This commit is contained in:
Marko Mäkelä 2024-09-03 18:22:10 +03:00
parent 9878238f74
commit 9f0b106631

View file

@ -2588,12 +2588,12 @@ ATTRIBUTE_COLD void buf_flush_page_cleaner_init()
/** Flush the buffer pool on shutdown. */
ATTRIBUTE_COLD void buf_flush_buffer_pool()
{
ut_ad(!os_aio_pending_reads());
ut_ad(!buf_page_cleaner_is_active);
ut_ad(!buf_flush_sync_lsn);
service_manager_extend_timeout(INNODB_EXTEND_TIMEOUT_INTERVAL,
"Waiting to flush the buffer pool");
os_aio_wait_until_no_pending_reads(false);
mysql_mutex_lock(&buf_pool.flush_list_mutex);