Commit e55e761e authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-31084 assert(waiting) failed in TP_connection_generic::wait_end

buf_flush_wait_flushed(): Correct the logic for registering a wait
around buf_flush_wait() that
commit a091d6ac
recently broke. This should be easily repeatable when using a
non-default startup parameter:

	thread-handling=pool-of-threads
parent abe4c7bf
...@@ -1905,9 +1905,13 @@ ATTRIBUTE_COLD void buf_flush_wait_flushed(lsn_t sync_lsn) ...@@ -1905,9 +1905,13 @@ ATTRIBUTE_COLD void buf_flush_wait_flushed(lsn_t sync_lsn)
} }
else else
#endif #endif
{
thd_wait_begin(nullptr, THD_WAIT_DISKIO);
tpool::tpool_wait_begin();
buf_flush_wait(sync_lsn); buf_flush_wait(sync_lsn);
tpool::tpool_wait_end();
thd_wait_end(nullptr); thd_wait_end(nullptr);
}
} }
mysql_mutex_unlock(&buf_pool.flush_list_mutex); mysql_mutex_unlock(&buf_pool.flush_list_mutex);
......
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