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

MDEV-27461: Buffer pool resize fails to wake up the page cleaner

buf_pool_t::realloc(): Invoke page_cleaner_wakeup()
if buf_LRU_get_free_only() returns a null pointer.

Ever since commit 7b1252c0 (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.
parent b7e4dc12
...@@ -1571,6 +1571,9 @@ inline bool buf_pool_t::realloc(buf_block_t *block) ...@@ -1571,6 +1571,9 @@ inline bool buf_pool_t::realloc(buf_block_t *block)
new_block = buf_LRU_get_free_only(); new_block = buf_LRU_get_free_only();
if (new_block == NULL) { 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 */ return(false); /* free list was not enough */
} }
......
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