Skip to content

Commit c430aa7

Browse files
committed
MDEV-26626 InnoDB fails to advance the log checkpoint
buf_flush_page_cleaner(): Always try to advance the log checkpoint, even when no pages were flushed during the latest batch. Maybe, since the previous batch, there was an LRU flush that removed the last dirty pages. Failure to advance the log checkpoint will cause unnecessary work in Mariabackup and on crash recovery.
1 parent 65cce29 commit c430aa7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

storage/innobase/buf/buf0flu.cc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2266,6 +2266,15 @@ static os_thread_ret_t DECLARE_THREAD(buf_flush_page_cleaner)(void*)
22662266
unemployed:
22672267
buf_flush_async_lsn= 0;
22682268
buf_pool.page_cleaner_set_idle(true);
2269+
2270+
DBUG_EXECUTE_IF("ib_log_checkpoint_avoid", continue;);
2271+
2272+
mysql_mutex_unlock(&buf_pool.flush_list_mutex);
2273+
2274+
if (!recv_recovery_is_on() && srv_operation == SRV_OPERATION_NORMAL)
2275+
log_checkpoint();
2276+
2277+
mysql_mutex_lock(&buf_pool.flush_list_mutex);
22692278
continue;
22702279
}
22712280

0 commit comments

Comments
 (0)