Commit 2283f82d authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-29905 fixup: Remove some unnecessary code

srv_shutdown(): Do not call log_free_check(), because it will now
be repeatedly called by ibuf_merge_all(). Do not call
srv_sync_log_buffer_in_background(), because we do not actually care
about durability during shutdown. Log writes will already be triggered
by buf_flush_page_cleaner() for writing back modified pages, possibly by
log_free_check().

logs_empty_and_mark_files_at_shutdown(): Clean up a condition.
This function is the caller of srv_shutdown(), and it will ensure that
the log and the buffer pool will be in clean state before shutdown.
parent 5bf5e6ee
......@@ -1096,13 +1096,9 @@ ATTRIBUTE_COLD void logs_empty_and_mark_files_at_shutdown()
}
/* We need these threads to stop early in shutdown. */
const char* thread_name;
if (srv_fast_shutdown != 2 && trx_rollback_is_active) {
thread_name = "rollback of recovered transactions";
} else {
thread_name = NULL;
}
const char* thread_name = srv_fast_shutdown != 2
&& trx_rollback_is_active
? "rollback of recovered transactions" : nullptr;
if (thread_name) {
ut_ad(!srv_read_only_mode);
......
......@@ -1677,13 +1677,8 @@ void srv_shutdown(bool ibuf_merge)
n_tables_to_drop = row_drop_tables_for_mysql_in_background();
if (ibuf_merge) {
srv_main_thread_op_info = "checking free log space";
log_free_check();
srv_main_thread_op_info = "doing insert buffer merge";
n_bytes_merged = ibuf_merge_all();
/* Flush logs if needed */
srv_sync_log_buffer_in_background();
}
/* Print progress message every 60 seconds during shutdown */
......
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