Commit 764ca7e6 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-27499 fixup: Add a wait to buf_flush_sync()

The test innodb.log_file_size would occasionally fail with
an assertion failure !buf_pool.any_io_pending(). Let us wait
for the page cleaner thread to become idle already in
srv_prepare_to_delete_redo_log_file(), like we used to.
parent 965c0d22
......@@ -2462,6 +2462,10 @@ void buf_flush_sync()
{
const lsn_t lsn= log_sys.get_lsn();
buf_flush_wait(lsn);
/* Wait for the page cleaner to be idle (for log resizing at startup) */
while (buf_flush_sync_lsn)
my_cond_wait(&buf_pool.done_flush_list,
&buf_pool.flush_list_mutex.m_mutex);
if (lsn == log_sys.get_lsn())
break;
}
......
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