Commit 02380cd3 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-21452 fixup: recursive recv_sys.mutex lock

In commit 38fd7b7d (MDEV-21452),
2 of the 3 callers of recv_sys.set_corrupt_fs() are already holding
recv_sys.mutex.
parent f8665314
......@@ -3028,7 +3028,11 @@ void fil_aio_callback(const IORequest &request)
if (dberr_t err= buf_page_read_complete(request.bpage, *request.node))
{
if (recv_recovery_is_on() && !srv_force_recovery)
{
mysql_mutex_lock(&recv_sys.mutex);
recv_sys.set_corrupt_fs();
mysql_mutex_unlock(&recv_sys.mutex);
}
ib::error() << "Failed to read page " << id.page_no()
<< " from file '" << request.node->name << "': " << err;
......
......@@ -2497,10 +2497,9 @@ ATTRIBUTE_COLD void recv_sys_t::set_corrupt_log()
ATTRIBUTE_COLD void recv_sys_t::set_corrupt_fs()
{
mysql_mutex_lock(&mutex);
mysql_mutex_assert_owner(&mutex);
found_corrupt_fs= true;
pthread_cond_broadcast(&cond);
mysql_mutex_unlock(&mutex);
}
/** Apply any buffered redo log to a page that was just read from a data file.
......
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