Skip to content

Commit

Permalink
Merge 10.10 into 10.11
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-m committed Oct 18, 2023
2 parents 2ecc044 + c857259 commit f833ef5
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
7 changes: 6 additions & 1 deletion extra/mariabackup/xtrabackup.cc
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion storage/innobase/fil/fil0fil.cc
Expand Up @@ -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)
{
Expand All @@ -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();
}

Expand Down
17 changes: 15 additions & 2 deletions storage/innobase/srv/srv0start.cc
Expand Up @@ -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();
Expand Down Expand Up @@ -1629,10 +1635,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();
Expand Down

0 comments on commit f833ef5

Please sign in to comment.