mirror of
https://github.com/MariaDB/server.git
synced 2026-05-07 07:35:32 +02:00
MDEV-23855: Implement asynchronous doublewrite
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
This commit is contained in:
parent
ef3f71fa74
commit
a5a2ef079c
6 changed files with 93 additions and 48 deletions
|
|
@ -198,6 +198,8 @@ public:
|
|||
WRITE_SYNC= 16,
|
||||
/** Asynchronous write */
|
||||
WRITE_ASYNC= WRITE_SYNC | 1,
|
||||
/** A doublewrite batch */
|
||||
DBLWR_BATCH= WRITE_ASYNC | 8,
|
||||
/** Write data; evict the block on write completion */
|
||||
WRITE_LRU= WRITE_ASYNC | 32,
|
||||
/** Write data and punch hole for the rest */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue