mirror of
https://github.com/MariaDB/server.git
synced 2026-05-07 23:54:31 +02:00
MDEV-29445 fixup: Make Valgrind fair again
recv_sys_t::wait_for_pool(): Also wait for pending writes, so that previously written blocks can be evicted and reused. buf_flush_sync_for_checkpoint(): Wait for pending writes, in order to guarantee progress even if the scheduler is unfair.
This commit is contained in:
parent
9a6540cb84
commit
027d815546
2 changed files with 3 additions and 0 deletions
|
|
@ -2195,6 +2195,8 @@ static void buf_flush_sync_for_checkpoint(lsn_t lsn) noexcept
|
|||
MONITOR_FLUSH_SYNC_PAGES, n_flushed);
|
||||
}
|
||||
|
||||
os_aio_wait_until_no_pending_writes(false);
|
||||
|
||||
switch (srv_file_flush_method) {
|
||||
case SRV_NOSYNC:
|
||||
case SRV_O_DIRECT_NO_FSYNC:
|
||||
|
|
|
|||
|
|
@ -2041,6 +2041,7 @@ ATTRIBUTE_COLD void recv_sys_t::wait_for_pool(size_t pages)
|
|||
{
|
||||
mysql_mutex_unlock(&mutex);
|
||||
os_aio_wait_until_no_pending_reads(false);
|
||||
os_aio_wait_until_no_pending_writes(false);
|
||||
mysql_mutex_lock(&mutex);
|
||||
garbage_collect();
|
||||
mysql_mutex_lock(&buf_pool.mutex);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue