Skip to content

Commit

Permalink
MDEV-26827 fixup: Prevent a hang in LRU eviction
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dr-m committed Apr 25, 2023
1 parent 818d5e4 commit c22ab93
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions storage/innobase/buf/buf0flu.cc
Expand Up @@ -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;
Expand Down

0 comments on commit c22ab93

Please sign in to comment.