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 d4265fbde5 we used to always
pass pct_lwm=0.0, which was not intended.

Reviewed by: Vladislav Vaintroub
This commit is contained in:
Marko Mäkelä 2023-12-08 09:31:34 +02:00
commit c8346c0bac

View file

@ -2379,10 +2379,11 @@ static os_thread_ret_t DECLARE_THREAD(buf_flush_page_cleaner)(void*)
else else
{ {
maybe_unemployed: maybe_unemployed:
const bool below{dirty_pct < pct_lwm}; if (dirty_pct < pct_lwm)
pct_lwm= 0.0; {
if (below) pct_lwm= 0.0;
goto possibly_unemployed; goto possibly_unemployed;
}
} }
} }
else if (dirty_pct < srv_max_buf_pool_modified_pct) else if (dirty_pct < srv_max_buf_pool_modified_pct)