Description:
Have a look at the method doxygen
```
/** Synchronously flush dirty blocks from the end of the flush list of all
buffer pool instances. NOTE: The calling thread is not allowed to own any
latches on pages! */
void buf_flush_sync_all_buf_pools() {
```
```
/** Synchronously flush dirty blocks from the end of the flush list of all
buffer pool instances. NOTE: The calling thread is not allowed to own any
latches on pages! */
```
and then, have a look at the call path where it flushes the pages asynchronously.
void buf_flush_sync_all_buf_pools()
buf_flush_lists
buf_flush_do_batch(BUF_FLUSH_LIST)
buf_flush_batch
buf_do_flush_list_batch
buf_flush_page_and_try_neighbors
buf_flush_try_neighbors
if (buf_flush_page(buf_pool, bpage, flush_type, /* sync= */ false))
How to repeat:
Read code above
Suggested fix:
IMO, we should update the method name and doxygen to reflect what does this method do.
Description: Have a look at the method doxygen ``` /** Synchronously flush dirty blocks from the end of the flush list of all buffer pool instances. NOTE: The calling thread is not allowed to own any latches on pages! */ void buf_flush_sync_all_buf_pools() { ``` ``` /** Synchronously flush dirty blocks from the end of the flush list of all buffer pool instances. NOTE: The calling thread is not allowed to own any latches on pages! */ ``` and then, have a look at the call path where it flushes the pages asynchronously. void buf_flush_sync_all_buf_pools() buf_flush_lists buf_flush_do_batch(BUF_FLUSH_LIST) buf_flush_batch buf_do_flush_list_batch buf_flush_page_and_try_neighbors buf_flush_try_neighbors if (buf_flush_page(buf_pool, bpage, flush_type, /* sync= */ false)) How to repeat: Read code above Suggested fix: IMO, we should update the method name and doxygen to reflect what does this method do.