MySQL 8.0.39
Source Code Documentation
|
The consistency information of a transaction, including its configuration and state. More...
#include <consistency_manager.h>
Public Member Functions | |
void * | operator new (size_t size, const std::nothrow_t &) noexcept |
void | operator delete (void *ptr, const std::nothrow_t &) noexcept |
void * | operator new (size_t size) noexcept |
Allocate memory on the heap with instrumented memory allocation, so that memory consumption can be tracked. More... | |
void | operator delete (void *ptr) noexcept |
Deallocate memory on the heap with instrumented memory allocation, so that memory consumption can be tracked. More... | |
Transaction_consistency_info (my_thread_id thread_id, bool local_transaction, const rpl_sid *sid, rpl_sidno sidno, rpl_gno gno, enum_group_replication_consistency_level consistency_level, Members_list *members_that_must_prepare_the_transaction) | |
Constructor. More... | |
virtual | ~Transaction_consistency_info () |
my_thread_id | get_thread_id () |
Get the thread id that is executing the transaction. More... | |
bool | is_local_transaction () |
Is the transaction from this server? More... | |
bool | is_transaction_prepared_locally () |
Is the transaction prepared locally? More... | |
rpl_sidno | get_sidno () |
Get the transaction sidno. More... | |
rpl_gno | get_gno () |
Get the transaction gno. More... | |
enum_group_replication_consistency_level | get_consistency_level () |
Get the transaction consistency. More... | |
bool | is_a_single_member_group () |
Is this transaction running on a single member group? More... | |
bool | is_the_transaction_prepared_remotely () |
Did all other ONLINE members already prepared the transaction? More... | |
int | after_applier_prepare (my_thread_id thread_id, Group_member_info::Group_member_status member_status) |
Call action after this transaction being prepared on this member applier. More... | |
int | handle_remote_prepare (const Gcs_member_identifier &gcs_member_id) |
Call action after this transaction being prepared by other member. More... | |
int | handle_member_leave (const std::vector< Gcs_member_identifier > &leaving_members) |
Call action after members leave the group. More... | |
Private Attributes | |
my_thread_id | m_thread_id |
const bool | m_local_transaction |
const bool | m_sid_specified |
rpl_sid | m_sid |
const rpl_sidno | m_sidno |
const rpl_gno | m_gno |
const enum_group_replication_consistency_level | m_consistency_level |
Members_list * | m_members_that_must_prepare_the_transaction |
std::unique_ptr< Checkable_rwlock > | m_members_that_must_prepare_the_transaction_lock |
bool | m_transaction_prepared_locally |
bool | m_transaction_prepared_remotely |
The consistency information of a transaction, including its configuration and state.
Transaction_consistency_info::Transaction_consistency_info | ( | my_thread_id | thread_id, |
bool | local_transaction, | ||
const rpl_sid * | sid, | ||
rpl_sidno | sidno, | ||
rpl_gno | gno, | ||
enum_group_replication_consistency_level | consistency_level, | ||
Members_list * | members_that_must_prepare_the_transaction | ||
) |
Constructor.
[in] | thread_id | the thread that is executing the transaction |
[in] | local_transaction | true if this transaction did originate from this server |
[in] | sid | transaction sid |
[in] | sidno | transaction sidno |
[in] | gno | transaction gno |
[in] | consistency_level | the transaction consistency |
[in] | members_that_must_prepare_the_transaction | list of the members that must prepare the transaction before it is allowed to commit |
|
virtual |
int Transaction_consistency_info::after_applier_prepare | ( | my_thread_id | thread_id, |
Group_member_info::Group_member_status | member_status | ||
) |
Call action after this transaction being prepared on this member applier.
[in] | thread_id | the applier thread id |
[in] | member_status | this member status |
0 | OK |
!=0 | error |
enum_group_replication_consistency_level Transaction_consistency_info::get_consistency_level | ( | ) |
Get the transaction consistency.
rpl_gno Transaction_consistency_info::get_gno | ( | ) |
Get the transaction gno.
rpl_sidno Transaction_consistency_info::get_sidno | ( | ) |
Get the transaction sidno.
my_thread_id Transaction_consistency_info::get_thread_id | ( | ) |
Get the thread id that is executing the transaction.
int Transaction_consistency_info::handle_member_leave | ( | const std::vector< Gcs_member_identifier > & | leaving_members | ) |
Call action after members leave the group.
If any of these members are on the prepare wait list, they will be removed. If the lists becomes empty, the transaction will proceed to commit.
[in] | leaving_members | the members that left |
0 | OK |
!=0 | error |
int Transaction_consistency_info::handle_remote_prepare | ( | const Gcs_member_identifier & | gcs_member_id | ) |
Call action after this transaction being prepared by other member.
[in] | gcs_member_id | the member id |
CONSISTENCY_INFO_OUTCOME_OK | OK |
CONSISTENCY_INFO_OUTCOME_ERROR | error |
CONSISTENCY_INFO_OUTCOME_COMMIT | transaction must proceeded to commit |
bool Transaction_consistency_info::is_a_single_member_group | ( | ) |
Is this transaction running on a single member group?
bool Transaction_consistency_info::is_local_transaction | ( | ) |
Is the transaction from this server?
bool Transaction_consistency_info::is_the_transaction_prepared_remotely | ( | ) |
Did all other ONLINE members already prepared the transaction?
bool Transaction_consistency_info::is_transaction_prepared_locally | ( | ) |
Is the transaction prepared locally?
|
inlinenoexcept |
Deallocate memory on the heap with instrumented memory allocation, so that memory consumption can be tracked.
[in] | ptr | pointer to the allocated memory |
|
inlinenoexcept |
|
inlinenoexcept |
Allocate memory on the heap with instrumented memory allocation, so that memory consumption can be tracked.
[in] | size | memory size to be allocated |
|
inlinenoexcept |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |