|
| | Reduced_double_write (uint16_t id, uint32_t n_pages) |
| | Constructor. More...
|
| |
| | ~Reduced_double_write () override |
| | Destructor. More...
|
| |
| virtual uint16_t | write_dblwr_pages (buf_flush_t flush_type) noexcept override |
| | Process the requests in the flush queue, write the space_id, page_id, LSN to the reduced double write file (.bdblwr), sync the file if required and then write to the data files. More...
|
| |
| dberr_t | allocate () |
| | Allocate a temporary buffer for writing page entries. More...
|
| |
| | Double_write (uint16_t id, uint32_t n_pages) noexcept |
| | Constructor. More...
|
| |
| virtual | ~Double_write () noexcept |
| | Destructor. More...
|
| |
| uint16_t | id () const noexcept |
| |
| void | write (buf_flush_t flush_type) noexcept |
| | Process the requests in the flush queue, write the blocks to the double write file, sync the file if required and then write to the data files. More...
|
| |
| bool | wait_for_pending_batch () noexcept |
| | Wait for any pending batch to complete. More...
|
| |
| bool | flush_to_disk (buf_flush_t flush_type) noexcept |
| | Flush buffered pages to disk, clear the buffers. More...
|
| |
| void | write_pages (buf_flush_t flush_type) noexcept |
| | Process the requests in the flush queue, write the blocks to the double write file, sync the file if required and then write to the data files. More...
|
| |
| void | write_data_pages (buf_flush_t flush_type, uint16_t batch_id) noexcept |
| |
| void | force_flush (buf_flush_t flush_type) noexcept |
| | Force a flush of the page queue. More...
|
| |
| void | enqueue (buf_flush_t flush_type, buf_page_t *bpage, const file::Block *e_block) noexcept |
| | Add a page to the flush batch. More...
|
| |
| void | batch_started () noexcept |
| | Note that the IO batch has started. More...
|
| |
| void | batch_completed () noexcept |
| | Wake up all the threads that were waiting for the batch to complete. More...
|
| |
| | Double_write (const Double_write &)=delete |
| |
| | Double_write (const Double_write &&)=delete |
| |
| Double_write & | operator= (Double_write &&)=delete |
| |
| Double_write & | operator= (const Double_write &)=delete |
| |
|
| static Double_write * | instance (buf_flush_t flush_type, uint32_t buf_pool_index, bool is_reduced) noexcept |
| |
| static dberr_t | create_batch_segments (uint32_t segments_per_file) noexcept |
| | Create the batch write segments. More...
|
| |
| static dberr_t | create_reduced_batch_segments () noexcept |
| | Create the Reduced batch write segments. More...
|
| |
| static dberr_t | create_single_segments () noexcept |
| | Create the single page flush segments. More...
|
| |
| static void | submit (buf_flush_t flush_type, buf_page_t *bpage, const file::Block *e_block) noexcept |
| | Get the instance that handles a particular page's IO. More...
|
| |
| static dberr_t | sync_page_flush (buf_page_t *bpage, file::Block *e_block) noexcept |
| | Writes a single page to the doublewrite buffer on disk, syncs it, then writes the page to the datafile. More...
|
| |
| static Double_write * | instance (buf_flush_t flush_type, const buf_page_t *bpage) noexcept |
| |
| static void | write_complete (buf_page_t *bpage, buf_flush_t flush_type) noexcept |
| | Updates the double write buffer when a write request is completed. More...
|
| |
| static bool | init_v1 (page_no_t &block1, page_no_t &block2) noexcept |
| | REad the V1 doublewrite buffer extents boundaries. More...
|
| |
| static bool | create_v1 (page_no_t &block1, page_no_t &block2) noexcept |
| | Creates the V1 doublewrite buffer extents. More...
|
| |
| static dberr_t | write_to_datafile (const buf_page_t *in_bpage, bool sync, const file::Block *e_block) noexcept |
| | Writes a page that has already been written to the doublewrite buffer to the data file. More...
|
| |
| static void | force_flush (buf_flush_t flush_type, uint32_t buf_pool_index) noexcept |
| | Force a flush of the page queue. More...
|
| |
| static dberr_t | load (dblwr::File &file, recv::Pages *pages) noexcept |
| | Load the doublewrite buffer pages from an external file. More...
|
| |
| static dberr_t | load_reduced_batch (dblwr::File &file, recv::Pages *pages) noexcept |
| | Load the reduced doublewrite buffer page entries from an reduced batch double write buffer file (.bdblwr) More...
|
| |
| static dberr_t | init_file (dblwr::File &file, uint32_t n_pages, uint32_t phy_size=univ_page_size.physical()) noexcept |
| | Write zeros to the file if it is "empty". More...
|
| |
| static void | reset_file (dblwr::File &file, bool truncate) noexcept |
| | Reset the size in bytes to the configured size. More...
|
| |
| static void | reduced_reset_file (dblwr::File &file, uint32_t pages_per_file, uint32_t phy_size) noexcept |
| | Reset the size in bytes to the configured size. More...
|
| |
| static void | reset_files () noexcept |
| | Reset the size in bytes to the configured size of all files. More...
|
| |
| static dberr_t | create_v2 () noexcept |
| | Create the v2 data structures. More...
|
| |
| static dberr_t | create_reduced () noexcept |
| | Create the data structures for reduced doublewrite buffer. More...
|
| |
| static bool | is_fsync_required () noexcept |
| |
| static void | prepare (const buf_page_t *bpage, void **ptr, uint32_t *len) noexcept |
| | Extract the data and length to write to the doublewrite file. More...
|
| |
| static void | shutdown () noexcept |
| | Free the data structures. More...
|
| |
| static void | toggle (ulong value) noexcept |
| | Toggle the doublewrite buffer dynamically. More...
|
| |
| static void | single_write (Segment *segment, const buf_page_t *bpage, file::Block *e_block) noexcept |
| | Write the data to disk synchronously. More...
|
| |
| unsigned long long | m_bytes_written {} |
| | Number of bytes written to disk by this instance. More...
|
| |
| static uint32_t | s_n_instances {} |
| | Number of instances. More...
|
| |
| static std::vector< dblwr::File > | s_files |
| | Files to use for atomic writes. More...
|
| |
| static std::vector< dblwr::File > | s_r_files |
| | Reduced batch doublewrite files to use for atomic writes. More...
|
| |
| static Instances * | s_instances {} |
| | The global instances. More...
|
| |
| static Instances * | s_r_instances {} |
| | The global Reduced Doublewrite instances. More...
|
| |
| using | Segments = mpmc_bq< Segment * > |
| |
| using | Instances = std::vector< Double_write * > |
| |
| using | Batch_segments = mpmc_bq< Batch_segment * > |
| |
| static void | free_segments (Batch_segments *&segments) noexcept |
| | Utility function to free batch segments. More...
|
| |
| static bool | is_reduced_batch_id (uint32_t batch_id) |
| |
| uint16_t | m_id {} |
| | Instance ID. More...
|
| |
| ib_mutex_t | m_mutex |
| | Protects m_buf_pages. More...
|
| |
| os_event_t | m_event |
| | Wait for IO batch to complete. More...
|
| |
| std::atomic_bool | m_batch_running {false} |
| | true if the the batch hasn't completed yet. More...
|
| |
| Buffer | m_buffer |
| | The copy of the page frame, the page must be in in m_buf_pages. More...
|
| |
| Buf_pages | m_buf_pages |
| | Pages that should be written to the data files. More...
|
| |
| static Batch_segments * | s_LRU_batch_segments {} |
| | File segments to use for LRU batched writes. More...
|
| |
| static Batch_segments * | s_flush_list_batch_segments {} |
| | File segments to use for flush list batched writes. More...
|
| |
| static Segments * | s_single_segments {} |
| | File segments to use for single page writes. More...
|
| |
| static Batch_segments * | s_r_LRU_batch_segments {} |
| | File segments to use for LRU batched writes in reduced dblwr mode. More...
|
| |
| static Batch_segments * | s_r_flush_list_batch_segments {} |
| | File segments to use for flush list batched writes (reduced mode) More...
|
| |
| static std::vector< Batch_segment * > | s_segments {} |
| | For indexing batch segments by ID. More...
|
| |
| static uint32_t | s_regular_last_batch_id {} |
| | Last used batch_id for regular batch segments. More...
|
| |
Reduced doublewrite implementation.
Uses separate .bdblwr files and can coexist with regular doublewrite buffer implementation