![]() |
MySQL 8.0.43
Source Code Documentation
|
Namespaces | |
| namespace | recv |
| namespace | v1 |
Classes | |
| struct | Buffer |
| IO buffer in UNIV_PAGE_SIZE units and aligned on UNIV_PAGE_SIZE. More... | |
| struct | File |
| struct | Mode |
| struct | Reduced_entry |
| When –innodb-doublewrite=DETECT_ONLY, page contents are not written to the dblwr buffer. More... | |
Functions | |
| bool | is_odd (uint32_t val) |
| std::ostream & | operator<< (std::ostream &out, const File &obj) noexcept |
| Overload the global output operator to work with dblwr::File type. More... | |
| static bool | is_encrypted_page (const byte *page) noexcept |
| bool | has_encrypted_pages () noexcept |
| Check if the dblwr files contain encrypted pages. More... | |
| dberr_t | open () noexcept |
| Startup the background thread(s) and create the instance. More... | |
| dberr_t | enable_reduced () noexcept |
| Enable the doublewrite reduced mode by creating the necessary dblwr files and in-memory structures. More... | |
| dberr_t | reduced_open () noexcept |
| Check and open the reduced doublewrite files if necessary. More... | |
| void | close () noexcept |
| Shutdown the background thread and destroy the instance. More... | |
| void | force_flush (buf_flush_t flush_type, uint32_t buf_pool_index) noexcept |
| Force a write of all pages in the queue. More... | |
| void | force_flush_all () noexcept |
| Force a write of all pages in all dblwr segments (reduced or regular) This is used only when switching the doublewrite mode dynamically. More... | |
| dberr_t | write (buf_flush_t flush_type, buf_page_t *bpage, bool sync) noexcept |
| Writes a page to the doublewrite buffer on disk, syncs it, then writes the page to the datafile. More... | |
| file::Block * | get_encrypted_frame (buf_page_t *bpage) noexcept |
| Obtain the encrypted frame and store it in bpage->m_io_frame. More... | |
| 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... | |
| void | reset_files () noexcept |
| Delete or adjust the dblwr file size if required. More... | |
| bool | is_enabled () |
| Check if doublewrite is enabled. More... | |
| bool | is_reduced () |
| Check if the doublewrite mode is detect-only (aka reduced). More... | |
| bool | is_disabled () |
| Check if the doublewrite mode is disabled. More... | |
| const char * | to_string (ulong mode) |
| void | set () |
| Toggle the doublewrite buffer. More... | |
Variables | |
| std::string | dir {"."} |
| Double write files location. More... | |
| ulong | n_files {1} |
| Number of files to use for the double write buffer. More... | |
| ulong | batch_size {} |
| Maximum number of pages to write in one batch. More... | |
| ulong | n_pages {64} |
| Number of pages per doublewrite thread/segment. More... | |
| ulong | g_mode {Mode::ON} |
| DBLWR mode. More... | |
| bool | is_reduced_inited = false |
| true if DETECT_ONLY (aka reduced) mode is inited More... | |
| static page_no_t | LEGACY_PAGE1 |
| Legacy dblwr buffer first segment page number. More... | |
| static page_no_t | LEGACY_PAGE2 |
| Legacy dblwr buffer second segment page number. More... | |
| page_id_t | Force_crash {UINT32_UNDEFINED, UINT32_UNDEFINED} |
| Crash the server after writing this page to the data file. More... | |
| const uint32_t | REDUCED_BATCH_PAGE_SIZE = 8192 |
| const uint32_t | RB_BATCH_ID_SIZE = 4 |
| const uint32_t | RB_CHECKSUM_SIZE = 4 |
| const uint32_t | RB_DATA_LEN_SIZE = 2 |
| const uint32_t | RB_BATCH_TYPE_SIZE = 1 |
| const uint32_t | RB_UNUSED_BYTES_SIZE = 9 |
| constexpr const uint32_t | RB_OFF_BATCH_ID = 0 |
| constexpr const uint32_t | RB_OFF_CHECKSUM = RB_OFF_BATCH_ID + RB_BATCH_ID_SIZE |
| constexpr const uint32_t | RB_OFF_DATA_LEN = RB_OFF_CHECKSUM + RB_CHECKSUM_SIZE |
| constexpr const uint32_t | RB_OFF_BATCH_TYPE = RB_OFF_DATA_LEN + RB_DATA_LEN_SIZE |
| constexpr const uint32_t | RB_OFF_UNUSED = RB_OFF_BATCH_TYPE + RB_BATCH_TYPE_SIZE |
| constexpr const uint32_t | REDUCED_HEADER_SIZE |
| constexpr const uint32_t | REDUCED_ENTRY_SIZE |
| constexpr const uint32_t | REDUCED_DATA_SIZE |
| constexpr const uint32_t | REDUCED_MAX_ENTRIES |
|
noexcept |
Shutdown the background thread and destroy the instance.
|
noexcept |
Enable the doublewrite reduced mode by creating the necessary dblwr files and in-memory structures.
|
noexcept |
Force a write of all pages in the queue.
| [in] | flush_type | FLUSH LIST or LRU_LIST flush request. |
| [in] | buf_pool_index | Buffer pool instance for which called. |
|
noexcept |
Force a write of all pages in all dblwr segments (reduced or regular) This is used only when switching the doublewrite mode dynamically.
|
noexcept |
Obtain the encrypted frame and store it in bpage->m_io_frame.
| [in,out] | bpage | the buffer page containing the unencrypted frame. |
|
noexcept |
Check if the dblwr files contain encrypted pages.
|
inline |
Check if the doublewrite mode is disabled.
|
inline |
Check if doublewrite is enabled.
|
staticnoexcept |
|
inline |
|
inline |
Check if the doublewrite mode is detect-only (aka reduced).
|
noexcept |
Startup the background thread(s) and create the instance.
|
inlinenoexcept |
Overload the global output operator to work with dblwr::File type.
| [in] | out | output stream into which the object is printed. |
| [in] | obj | An object to type dblwr::File. |
|
noexcept |
Check and open the reduced doublewrite files if necessary.
|
noexcept |
Delete or adjust the dblwr file size if required.
| void dblwr::set | ( | ) |
Toggle the doublewrite buffer.
| const char * dblwr::to_string | ( | ulong | mode | ) |
| [in] | mode | dblwr ENUM |
|
noexcept |
Writes a page to the doublewrite buffer on disk, syncs it, then writes the page to the datafile.
| [in] | flush_type | Flush type |
| [in] | bpage | Buffer block to write |
| [in] | sync | True if sync IO requested |
|
noexcept |
Updates the double write buffer when a write request is completed.
| [in] | bpage | Block that has just been writtent to disk. |
| [in] | flush_type | Flush type that triggered the write. |
| ulong dblwr::batch_size {} |
Maximum number of pages to write in one batch.
| std::string dblwr::dir {"."} |
Double write files location.
| page_id_t dblwr::Force_crash {UINT32_UNDEFINED, UINT32_UNDEFINED} |
Crash the server after writing this page to the data file.
| ulong dblwr::g_mode {Mode::ON} |
DBLWR mode.
| bool dblwr::is_reduced_inited = false |
true if DETECT_ONLY (aka reduced) mode is inited
|
static |
Legacy dblwr buffer first segment page number.
|
static |
Legacy dblwr buffer second segment page number.
| ulong dblwr::n_files {1} |
Number of files to use for the double write buffer.
It must be <= than the number of buffer pool instances.
| ulong dblwr::n_pages {64} |
Number of pages per doublewrite thread/segment.
| const uint32_t dblwr::RB_BATCH_ID_SIZE = 4 |
| const uint32_t dblwr::RB_BATCH_TYPE_SIZE = 1 |
| const uint32_t dblwr::RB_CHECKSUM_SIZE = 4 |
| const uint32_t dblwr::RB_DATA_LEN_SIZE = 2 |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
| const uint32_t dblwr::RB_UNUSED_BYTES_SIZE = 9 |
| const uint32_t dblwr::REDUCED_BATCH_PAGE_SIZE = 8192 |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |