diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2022-01-17 16:09:09 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2022-01-17 16:09:09 +0200 |
commit | f18e25649d32d20979ba16135afc501b85c0f040 (patch) | |
tree | 536a97561d91ab20fc7bf9862796cffe7d23edf7 | |
parent | b7e4dc121a99e7d38ce2d50ad8f9f948152d7e17 (diff) | |
download | mariadb-git-f18e25649d32d20979ba16135afc501b85c0f040.tar.gz |
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 7b1252c03d7131754d9503560fe507b33ca1f8b4 (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.
-rw-r--r-- | storage/innobase/buf/buf0buf.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc index 5a49757e857..f55f663a11d 100644 --- a/storage/innobase/buf/buf0buf.cc +++ b/storage/innobase/buf/buf0buf.cc @@ -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 */ } |