Skip to content

Commit

Permalink
MDEV-32134 InnoDB hang in buf_flush_wait_LRU_batch_end()
Browse files Browse the repository at this point in the history
buf_flush_page_cleaner(): Before finishing a batch, wake up any threads
that are waiting for buf_pool.done_flush_LRU.

This should fix a hung shutdown that we observed
after SET GLOBAL innodb_buffer_pool_size started was executed
to shrink the InnoDB buffer pool.
  • Loading branch information
dr-m committed Sep 11, 2023
1 parent 466d9f5 commit cdd2fa7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions storage/innobase/buf/buf0flu.cc
Expand Up @@ -2295,6 +2295,7 @@ static void buf_flush_page_cleaner()
set_idle:
buf_pool.page_cleaner_set_idle(true);
set_almost_idle:
pthread_cond_broadcast(&buf_pool.done_flush_LRU);
pthread_cond_broadcast(&buf_pool.done_flush_list);
if (UNIV_UNLIKELY(srv_shutdown_state > SRV_SHUTDOWN_INITIATED))
break;
Expand Down

0 comments on commit cdd2fa7

Please sign in to comment.