Skip to content

Commit

Permalink
MDEV-27461: Buffer pool resize fails to wake up the page cleaner
Browse files Browse the repository at this point in the history
buf_pool_t::realloc(): Invoke page_cleaner_wakeup()
if buf_LRU_get_free_only() returns a null pointer.

Ever since commit 7b1252c (MDEV-24278)
the page cleaner would remain in untimed sleep, expecting explicit
calls to buf_pool_t::page_cleaner_wakeup() when the ratio of dirty pages
could change.

Failure to wake up the page cleaner will cause all page writes to be
initiated by buf_flush_LRU_list_batch(). That might work too,
provided that the buffer pool size is at least BUF_LRU_MIN_LEN (256)
pages, but it would not advance the log checkpoint.
  • Loading branch information
dr-m committed Jan 17, 2022
1 parent b7e4dc1 commit f18e256
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions storage/innobase/buf/buf0buf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1571,6 +1571,9 @@ inline bool buf_pool_t::realloc(buf_block_t *block)
new_block = buf_LRU_get_free_only();

if (new_block == NULL) {
mysql_mutex_lock(&buf_pool.flush_list_mutex);
page_cleaner_wakeup();
mysql_mutex_unlock(&buf_pool.flush_list_mutex);
return(false); /* free list was not enough */
}

Expand Down

0 comments on commit f18e256

Please sign in to comment.