• Marko Mäkelä's avatar
    MDEV-23855: Implement asynchronous doublewrite · a5a2ef07
    Marko Mäkelä authored
    Synchronous writes and calls to fdatasync(), fsync() or
    FlushFileBuffers() would ruin performance. So, let us
    submit asynchronous writes for the doublewrite buffer.
    We submit a single request for the likely case that the
    two doublewrite buffers are contiquous in the system tablespace.
    
    buf_dblwr_t::flush_buffered_writes_completed(): The completion callback
    of buf_dblwr_t::flush_buffered_writes().
    
    os_aio_wait_until_no_pending_writes(): Also wait for doublewrite batches.
    
    buf_dblwr_t::element::space: Remove. We can simply use
    element::request.node->space instead.
    
    Reviewed by: Vladislav Vaintroub
    a5a2ef07
fil0fil.cc 107 KB