MySQL 8.4.2
Source Code Documentation
|
This class implements the rules for fetching the pages from the buffer pool depending on the context. More...
Public Member Functions | |
Buf_fetch (const page_id_t &page_id, const page_size_t &page_size) noexcept | |
Constructor. More... | |
buf_block_t * | single_page () |
For fetching a single page. More... | |
Public Attributes | |
const page_id_t & | m_page_id |
ID of page to lookup. More... | |
const page_size_t & | m_page_size |
Size of page on disk. More... | |
const bool | m_is_temp_space {} |
true if page belongs to a temporary tablespace. More... | |
ulint | m_rw_latch |
Latch mode required on the page. More... | |
buf_block_t * | m_guess {} |
Hint about page to fetch. More... | |
Page_fetch | m_mode |
Fetch mode. More... | |
const char * | m_file {} |
File from where called. More... | |
ulint | m_line {} |
Line number in file from where called. More... | |
mtr_t * | m_mtr {} |
Mini-transaction covering the fetch. More... | |
bool | m_dirty_with_no_latch {} |
Mark page as dirty even if page is being pinned without any latch. More... | |
size_t | m_retries {} |
Number of retries before giving up. More... | |
buf_pool_t * | m_buf_pool {} |
Buffer pool to fetch from. More... | |
rw_lock_t * | m_hash_lock {} |
Hash table lock. More... | |
friend | T |
Private Member Functions | |
buf_block_t * | lookup () |
Lookup page in the hash table. More... | |
buf_block_t * | is_on_watch () |
Get page if it's in the buffer pool or set a watch on it. More... | |
void | read_page () |
Initiate a read request from persistent store. More... | |
dberr_t | zip_page_handler (buf_block_t *&fix_block) |
dberr_t | check_state (buf_block_t *&block) |
Check block state. More... | |
void | temp_space_page_handler (buf_block_t *block) |
Temporary table pages have different latching rules because they are not redo logged. More... | |
void | mtr_add_page (buf_block_t *block) |
Add the page to the mini-transaction along with latching context. More... | |
bool | is_optimistic () const |
Check if fetch mode is an optimistic fetch. More... | |
bool | is_possibly_freed () const noexcept |
Check if the fetch mode is OK with freed pages. More... | |
dberr_t | debug_check (buf_block_t *fix_block) |
This class implements the rules for fetching the pages from the buffer pool depending on the context.
It will set the page latches as requested, detect and handle stale reads and initiate read requests if required.
|
inlinenoexcept |
Constructor.
[in] | page_id | ID of page to fetch. |
[in] | page_size | Size of page on disk. |
|
private |
Check block state.
|
private |
|
private |
Get page if it's in the buffer pool or set a watch on it.
Check if fetch mode is an optimistic fetch.
Check if the fetch mode is OK with freed pages.
|
private |
Lookup page in the hash table.
|
private |
Add the page to the mini-transaction along with latching context.
[in,out] | block | Block for which to add the latching context. |
Initiate a read request from persistent store.
buf_block_t * Buf_fetch< T >::single_page |
For fetching a single page.
|
private |
Temporary table pages have different latching rules because they are not redo logged.
[in,out] | block | Temporary tablespace to fetch. |
|
private |
buf_pool_t* Buf_fetch< T >::m_buf_pool {} |
Buffer pool to fetch from.
Mark page as dirty even if page is being pinned without any latch.
buf_block_t* Buf_fetch< T >::m_guess {} |
Hint about page to fetch.
true if page belongs to a temporary tablespace.
Page_fetch Buf_fetch< T >::m_mode |
Fetch mode.
const page_size_t& Buf_fetch< T >::m_page_size |
Size of page on disk.
friend Buf_fetch< T >::T |