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

Merge 10.6 into 10.10

parents a49ebf71 bf7c6fc2
......@@ -2396,10 +2396,15 @@ static bool innodb_init()
buf_flush_sync();
recv_sys.debug_free();
ut_ad(!os_aio_pending_reads());
ut_ad(!os_aio_pending_writes());
ut_d(mysql_mutex_lock(&buf_pool.flush_list_mutex));
ut_ad(!buf_pool.get_oldest_modification(0));
ut_d(mysql_mutex_unlock(&buf_pool.flush_list_mutex));
/* os_aio_pending_writes() may hold here if some write_io_callback()
did not release the slot yet. However, the page write itself must
have completed, because the buf_pool.flush_list is empty. In debug
builds, we wait for this to happen, hoping to get a hung process if
this assumption does not hold. */
ut_d(os_aio_wait_until_no_pending_writes(false));
log_sys.close_file();
if (xtrabackup_incremental)
......
......@@ -2804,6 +2804,7 @@ void IORequest::write_complete(int io_error) const
ut_ad(fil_validate_skip());
ut_ad(node);
ut_ad(is_write());
node->complete_write();
if (!bpage)
{
......@@ -2816,7 +2817,6 @@ void IORequest::write_complete(int io_error) const
else
buf_page_write_complete(*this, io_error);
node->complete_write();
node->space->release();
}
......
......@@ -183,10 +183,16 @@ static dberr_t create_log_file(bool create_new_db, lsn_t lsn)
delete_log_files();
ut_ad(!os_aio_pending_reads());
ut_ad(!os_aio_pending_writes());
ut_d(mysql_mutex_lock(&buf_pool.flush_list_mutex));
ut_ad(!buf_pool.get_oldest_modification(0));
ut_d(mysql_mutex_unlock(&buf_pool.flush_list_mutex));
/* os_aio_pending_writes() may hold here if some
write_io_callback() did not release the slot yet. However,
the page write itself must have completed, because the
buf_pool.flush_list is empty. In debug builds, we wait for
this to happen, hoping to get a hung process if this
assumption does not hold. */
ut_d(os_aio_wait_until_no_pending_writes(false));
log_sys.latch.wr_lock(SRW_LOCK_CALL);
log_sys.set_capacity();
......@@ -1388,10 +1394,17 @@ dberr_t srv_start(bool create_new_db)
end of create_log_file(). */
ut_d(recv_no_log_write = true);
ut_ad(!os_aio_pending_reads());
ut_ad(!os_aio_pending_writes());
ut_d(mysql_mutex_lock(&buf_pool.flush_list_mutex));
ut_ad(!buf_pool.get_oldest_modification(0));
ut_d(mysql_mutex_unlock(&buf_pool.flush_list_mutex));
/* os_aio_pending_writes() may hold here if
some write_io_callback() did not release the
slot yet. However, the page write itself must
have completed, because the buf_pool.flush_list
is empty. In debug builds, we wait for this to
happen, hoping to get a hung process if this
assumption does not hold. */
ut_d(os_aio_wait_until_no_pending_writes(false));
/* Close the redo log file, so that we can replace it */
log_sys.close_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