Browse Source

Cleanup: deduplicate code

bb-10.5-MDEV-25783
Marko Mäkelä 4 years ago
parent
commit
601eb41183
  1. 8
      storage/innobase/buf/buf0flu.cc

8
storage/innobase/buf/buf0flu.cc

@ -2361,16 +2361,10 @@ void buf_flush_sync()
{ {
const ulint n_flushed= buf_flush_lists(srv_max_io_capacity, LSN_MAX); const ulint n_flushed= buf_flush_lists(srv_max_io_capacity, LSN_MAX);
buf_flush_wait_batch_end_acquiring_mutex(false); buf_flush_wait_batch_end_acquiring_mutex(false);
if (!n_flushed)
{
mysql_mutex_lock(&buf_pool.flush_list_mutex);
const auto len= UT_LIST_GET_LEN(buf_pool.flush_list);
mysql_mutex_unlock(&buf_pool.flush_list_mutex);
if (!len)
if (!n_flushed && !buf_flush_list_length())
return; return;
} }
} }
}
#ifdef UNIV_DEBUG #ifdef UNIV_DEBUG
/** Functor to validate the flush list. */ /** Functor to validate the flush list. */

Loading…
Cancel
Save