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

MDEV-26819 SET GLOBAL innodb_max_dirty_pages_pct=0 occasionally fails to trigger writes

innodb_max_dirty_pages_pct_update(),
innodb_max_dirty_pages_pct_lwm_update():
Invoke buf_pool.page_cleaner_wakeup() in order to wake up
buf_flush_page_cleaner. This allows the test innodb.page_cleaner
to run without any occasional timeouts.

The occasional hangs were introduced by
commit 7b1252c0 (MDEV-24278).
parent ddf95e83
......@@ -123,7 +123,7 @@ static void buf_flush_validate_skip()
#endif /* UNIV_DEBUG */
/** Wake up the page cleaner if needed */
inline void buf_pool_t::page_cleaner_wakeup()
void buf_pool_t::page_cleaner_wakeup()
{
if (!page_cleaner_idle())
return;
......
......@@ -17214,7 +17214,12 @@ innodb_max_dirty_pages_pct_update(
}
srv_max_buf_pool_modified_pct = in_val;
pthread_cond_signal(&buf_pool.do_flush_list);
mysql_mutex_unlock(&LOCK_global_system_variables);
mysql_mutex_lock(&buf_pool.flush_list_mutex);
buf_pool.page_cleaner_wakeup();
mysql_mutex_unlock(&buf_pool.flush_list_mutex);
mysql_mutex_lock(&LOCK_global_system_variables);
}
/****************************************************************//**
......@@ -17245,7 +17250,12 @@ innodb_max_dirty_pages_pct_lwm_update(
}
srv_max_dirty_pages_pct_lwm = in_val;
pthread_cond_signal(&buf_pool.do_flush_list);
mysql_mutex_unlock(&LOCK_global_system_variables);
mysql_mutex_lock(&buf_pool.flush_list_mutex);
buf_pool.page_cleaner_wakeup();
mysql_mutex_unlock(&buf_pool.flush_list_mutex);
mysql_mutex_lock(&LOCK_global_system_variables);
}
/*************************************************************//**
......
......@@ -1935,7 +1935,7 @@ class buf_pool_t
return page_cleaner_is_idle;
}
/** Wake up the page cleaner if needed */
inline void page_cleaner_wakeup();
void page_cleaner_wakeup();
/** Register whether an explicit wakeup of the page cleaner is needed */
void page_cleaner_set_idle(bool deep_sleep)
......
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