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

MDEV-31939 Adaptive flush recommendation ignores dirty ratio and checkpoint age

buf_flush_page_cleaner(): Pass pct_lwm=srv_max_dirty_pages_pct_lwm
(innodb_max_dirty_pages_pct_lwm) to
page_cleaner_flush_pages_recommendation() unless the dirty page ratio
of the buffer pool is below that. Starting with
commit d4265fbd we used to always
pass pct_lwm=0.0, which was not intended.

Reviewed by: Vladislav Vaintroub
parent d7c6d306
......@@ -2379,12 +2379,13 @@ static os_thread_ret_t DECLARE_THREAD(buf_flush_page_cleaner)(void*)
else
{
maybe_unemployed:
const bool below{dirty_pct < pct_lwm};
if (dirty_pct < pct_lwm)
{
pct_lwm= 0.0;
if (below)
goto possibly_unemployed;
}
}
}
else if (dirty_pct < srv_max_buf_pool_modified_pct)
possibly_unemployed:
if (!lsn_limit && !soft_lsn_limit && !af_needed_for_redo(oldest_lsn))
......
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