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

MDEV-26827 fixup: Prevent a hang in LRU eviction

buf_pool_t::page_cleaner_wakeup(): If for_LRU=true, wake up the page
cleaner immediately, also when it is in a timed wait. This avoids an
unnecessary delay of up to 1 second.
parent 818d5e48
......@@ -115,7 +115,12 @@ static void buf_flush_validate_skip()
void buf_pool_t::page_cleaner_wakeup(bool for_LRU)
{
if (!page_cleaner_idle())
{
if (for_LRU)
/* Ensure that the page cleaner is not in a timed wait. */
pthread_cond_signal(&do_flush_list);
return;
}
double dirty_pct= double(UT_LIST_GET_LEN(buf_pool.flush_list)) * 100.0 /
double(UT_LIST_GET_LEN(buf_pool.LRU) + UT_LIST_GET_LEN(buf_pool.free));
double pct_lwm= srv_max_dirty_pages_pct_lwm;
......
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