MySQL 9.1.0
Source Code Documentation
|
Pages recovered from the doublewrite buffer. More...
Public Types | |
using | Buffers = std::vector< Page *, ut::allocator< Page * > > |
using | Page_entries = std::vector< Page_entry, ut::allocator< Page_entry > > |
Public Member Functions | |
Pages () | |
Default constructor. More... | |
~Pages () noexcept | |
Destructor. More... | |
void | add (page_no_t page_no, const byte *page, uint32_t n_bytes) noexcept |
Add a page frame to the doublewrite recovery buffer. More... | |
void | add_entry (Page_entry &pg_entry) |
Add a page entry from reduced doublewrite buffer to vector. More... | |
const byte * | find (const page_id_t &page_id) const noexcept |
Find a doublewrite copy of a page. More... | |
bool | is_recovered (const page_id_t &page_id) const noexcept |
bool | dblwr_recover_page (page_no_t dblwr_page_no, fil_space_t *space, page_no_t page_no, byte *page) noexcept |
Recover a page from the doublewrite buffer. More... | |
std::tuple< bool, bool > | is_actual_page_corrupted (fil_space_t *space, page_id_t &page_id) |
Checks if page in tablespace is corrupted or an all-zero page. More... | |
std::tuple< bool, lsn_t > | find_entry (const page_id_t &page_id) const noexcept |
Check if page was logged in reduced doublewrite buffer mode, if so also return the page LSN. More... | |
void | recover (fil_space_t *space) noexcept |
Recover double write buffer pages. More... | |
void | check_missing_tablespaces () const noexcept |
Check if some pages could be restored because of missing tablespace IDs. More... | |
Buffers & | get_pages () noexcept |
Object the vector of pages. More... | |
Private Member Functions | |
void | reduced_recover (fil_space_t *space) noexcept |
Check if page is logged in reduced doublewrite buffer. More... | |
Pages (const Pages &)=delete | |
Pages (const Pages &&)=delete | |
Pages & | operator= (Pages &&)=delete |
Pages & | operator= (const Pages &)=delete |
Private Attributes | |
Buffers | m_pages |
Recovered doublewrite buffer page frames. More... | |
Page_entries | m_page_entries |
Page entries from reduced doublewrite buffer. More... | |
Pages recovered from the doublewrite buffer.
using dblwr::recv::Pages::Buffers = std::vector<Page *, ut::allocator<Page *> > |
using dblwr::recv::Pages::Page_entries = std::vector<Page_entry, ut::allocator<Page_entry> > |
|
inline |
Default constructor.
|
inlinenoexcept |
Destructor.
|
privatedelete |
|
privatedelete |
Add a page frame to the doublewrite recovery buffer.
[in] | page_no | Page number in the doublewrite buffer |
[in] | page | Page contents |
[in] | n_bytes | Size in bytes |
|
inline |
Add a page entry from reduced doublewrite buffer to vector.
[in] | pg_entry | Reduced doublewrite buffer entry |
|
noexcept |
Check if some pages could be restored because of missing tablespace IDs.
|
noexcept |
Recover a page from the doublewrite buffer.
[in] | dblwr_page_no | Page number if the doublewrite buffer |
[in] | space | Tablespace the page belongs to |
[in] | page_no | Page number in the tablespace |
[in] | page | Data to write to <space, page_no> |
Find a doublewrite copy of a page.
[in] | page_id | Page number to lookup |
nullptr | if no page was found |
|
inlinenoexcept |
Check if page was logged in reduced doublewrite buffer mode, if so also return the page LSN.
Note if there are multiple entries of same page, we return the max_LSN of all entries.
[in] | page_id | Page number to lookup |
tuple<0> | - true if the page is found in reduced doublewrite buffer, false if no page was found tuple<1> - if tuple<0> is true (ie page found in reduced dblwr mode), then return the max page LSN |
|
inlinenoexcept |
Object the vector of pages.
std::tuple< bool, bool > dblwr::recv::Pages::is_actual_page_corrupted | ( | fil_space_t * | space, |
page_id_t & | page_id | ||
) |
Checks if page in tablespace is corrupted or an all-zero page.
[in] | space | Tablespace object |
[in] | page_id | Page number to check for corruption |
|
noexcept |
[in] | page_id | Page number to lookup |
|
noexcept |
Recover double write buffer pages.
[in] | space | Tablespace pages to recover, if set to nullptr then try and recovery all. |
|
privatenoexcept |
Check if page is logged in reduced doublewrite buffer.
We cannot recover page because the entire page is not logged only an entry of space_id, page_id, LSN is logged. So we abort the server. It is expected that the user restores from backup
[in] | space | Tablespace pages to check in reduced dblwr, if set to nullptr then try and recovery all. |
|
private |
Page entries from reduced doublewrite buffer.
|
private |
Recovered doublewrite buffer page frames.