MySQL 9.1.0
Source Code Documentation
|
The purpose of this class is to hide the knowledge that Buf_io_fix_latching_rules even exists from users of buf_page_t class, while also avoiding having to tediously repeat yourself in each place where buf_page_t's implementation needs to pass typical arguments to Buf_io_fix_latching_rules such as owned_latches or current state, which require access to private fields of buf_page_t. More...
Static Public Member Functions | |
static Buf_io_fix_latching_rules::latches_set_t | get_owned_latches (const buf_page_t &page) |
Retrieves the set of latches held by current thread which are relevant to latching rules for the io_fix field of a given page. More... | |
static void | assert_latches_let_distinguish (const buf_page_t &page, const Buf_io_fix_latching_rules::nodes_set_t &A, const Buf_io_fix_latching_rules::nodes_set_t &B) |
Checks if the current thread owns latches which are sufficient for a given page to meaningfully ask a question if page's io_fix value belongs to set A as opposed to set B. More... | |
static void | assert_latches_let_distinguish (const buf_page_t &page, const Buf_io_fix_latching_rules::nodes_set_t &A) |
This is a convenience function the special case of the. More... | |
static void | on_transition_to (const buf_page_t &page, const Buf_io_fix_latching_rules::node_t &new_state) |
Verifies that the current thread holds one of allowed sets of latches for a given transition from current page's io_fix state to new_state. More... | |
The purpose of this class is to hide the knowledge that Buf_io_fix_latching_rules even exists from users of buf_page_t class, while also avoiding having to tediously repeat yourself in each place where buf_page_t's implementation needs to pass typical arguments to Buf_io_fix_latching_rules such as owned_latches or current state, which require access to private fields of buf_page_t.
So, the members of Latching_rules_helpers are conceptually like private methods of buf_page_t, but not exposed in the buf0buf.h file, so nobody else has to know about them.
|
inlinestatic |
This is a convenience function the special case of the.
[in] | page | the page which has the io_fix field we care about |
[in] | A | a set of buf_io_fix values |
|
inlinestatic |
Checks if the current thread owns latches which are sufficient for a given page to meaningfully ask a question if page's io_fix value belongs to set A as opposed to set B.
In particular it assumes that current thread indeed holds the latches preventing a state transition from A to outside of A, and from B to outside of B. Otherwise it prints error message to stderr and triggers assertion failure.
[in] | page | the page which has the io_fix field we care about |
[in] | A | first set of buf_io_fix values |
[in] | B | second set of buf_io_fix values |
|
inlinestatic |
Retrieves the set of latches held by current thread which are relevant to latching rules for the io_fix field of a given page.
[in] | page | the page which has the io_fix field we care about |
|
inlinestatic |
Verifies that the current thread holds one of allowed sets of latches for a given transition from current page's io_fix state to new_state.
Otherwise prints an error to std::cerr and triggers assertion failure
[in] | page | the page which will change io_fix state |
[in] | new_state | the new desired state of io_fix for this page |