![]() |
MySQL 26.7.0
Source Code Documentation
|
Classes | |
| class | DBLWR |
| Redo recovery configuration. More... | |
| struct | Page |
| Page recovered from the doublewrite buffer. More... | |
| struct | Page_entry |
| A record from reduced doublewrite buffer. More... | |
| class | Pages |
| Pages recovered from the doublewrite buffer. More... | |
Functions | |
| static std::pair< std::string, page_no_t > | get_node_and_page_no_for_error (const fil_space_t &space, const page_id_t page_id) |
| Helper method to calculate name of file and page offset inside it for reporting errors during Double-write recovery. More... | |
| dberr_t | reduced_load (recv::Pages *pages) noexcept |
| Load the doublewrite buffer pages. More... | |
| void | create (Pages *&pages) noexcept |
| Create the recovery dblwr data structures. More... | |
| dberr_t | load (Pages *pages) noexcept |
| Load the doublewrite buffer pages. More... | |
| void | recover (Pages &pages, fil_space_t &space) noexcept |
| Restore corrupted pages of the tablespace from the double write buffer. More... | |
| const byte * | get_first_page_content_for_recovery (const recv::Pages &pages, space_id_t space_id, page_size_t page_size, const std::string &file_path, const byte *page_content) |
| Checks if content of the first page provided from the specified space requires recovery from the Double-write Buffer. More... | |
| void | check_missing_tablespaces (const Pages *pages) noexcept |
| Check if some pages from the double write buffer could not be restored because of the missing tablespace IDs. More... | |
| void | destroy (Pages *&pages) noexcept |
| Free the recovery dblwr data structures. More... | |
|
noexcept |
Check if some pages from the double write buffer could not be restored because of the missing tablespace IDs.
| [in] | pages | Pages to check |
|
noexcept |
Create the recovery dblwr data structures.
| [out] | pages | Pointer to newly created instance |
|
noexcept |
Free the recovery dblwr data structures.
| [out] | pages | Instance of the Pages to free. |
| const byte * dblwr::recv::get_first_page_content_for_recovery | ( | const recv::Pages & | pages, |
| space_id_t | space_id, | ||
| page_size_t | page_size, | ||
| const std::string & | file_path, | ||
| const byte * | page_content | ||
| ) |
Checks if content of the first page provided from the specified space requires recovery from the Double-write Buffer.
If the supplied page_content has a valid not corrupted page, no action is taken. If it is not, then we try to get a non-corrupted copy from the Double-write Buffer. If there are any entries in the Reduced Double-write pages list, we may crash.
| [in] | pages | The Double-write pages read from the Double-write Buffer. |
| [in] | space_id | ID of the space to be checked. |
| [in] | page_size | Page size structure to use for the tablespace page manipulation. |
| [in] | file_path | Path of a file to be used for error reporting. |
| [in] | page_content | Content of the first page of the specified tablespace read from the disk. The buffer must hold at least page_size.physical() bytes. |
page_content if the page does not require recovery, pointer to page contents from the Double-write Buffer or nullptr if page_content is corrupted, but there's no valid image of it in the Double-write Buffer to restore it from
|
static |
Helper method to calculate name of file and page offset inside it for reporting errors during Double-write recovery.
|
noexcept |
Load the doublewrite buffer pages.
| [in,out] | pages | For storing the doublewrite pages read from the double write buffer |
|
noexcept |
Restore corrupted pages of the tablespace from the double write buffer.
Iterates over the supplied double write buffer pages, but only ones that are not corrupted, searching for mentions of pages from the specified space, and for each such page checks if tablespace file contains a corrupted version of it and if so, restores it from the backup in image found in double write buffer page, unless this is impossible because the double write buffer page does not contain the body (in reduced, detect-only mode). In case of any errors (IO errors, out of bounds space access) we crash the server.
| [in,out] | pages | Pages from the doublewrite buffer |
| [in] | space | Tablespace to restore pages in. |
|
noexcept |
Load the doublewrite buffer pages.
| [in,out] | pages | For storing the doublewrite pages read from the double write buffer |