Bug #120241 Fix ambiguity in the name and doxygen of method buf_flush_sync_all_buf_pools()
Submitted: 9 Apr 11:02
Reporter: Rahul Sisondia Email Updates:
Status: Open Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:trunk OS:Any
Assigned to: CPU Architecture:Any

[9 Apr 11:02] Rahul Sisondia
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.