MySQL 8.0.39
Source Code Documentation
|
The group action class to do migration to multi primary mode. More...
#include <multi_primary_migration_action.h>
Public Member Functions | |
Multi_primary_migration_action () | |
Create a new primary election action. More... | |
Multi_primary_migration_action (my_thread_id invoking_thread_id) | |
Create a new primary election action. More... | |
~Multi_primary_migration_action () override | |
void | get_action_message (Group_action_message **message) override |
Get the message with parameters to this action. More... | |
int | process_action_message (Group_action_message &message, const std::string &message_origin) override |
Group_action::enum_action_execution_result | execute_action (bool invoking_member, Plugin_stage_monitor_handler *stage_handler, Notification_context *ctx) override |
Execute the action. More... | |
bool | stop_action_execution (bool killed) override |
Group_action_diagnostics * | get_execution_info () override |
Gets the info about execution, be it success or failure. More... | |
PSI_stage_key | get_action_stage_termination_key () override |
For this action, what is the PSI key for the last stage when the action is terminating. More... | |
Public Member Functions inherited from Group_action | |
virtual | ~Group_action ()=0 |
Private Member Functions | |
bool | persist_variable_values () |
Persist the value of the variables changed in the action. More... | |
void | log_result_execution (bool aborted, bool mode_changed) |
Log the result of the execution. More... | |
int | after_view_change (const std::vector< Gcs_member_identifier > &joining, const std::vector< Gcs_member_identifier > &leaving, const std::vector< Gcs_member_identifier > &group, bool is_leaving, bool *skip_election, enum_primary_election_mode *election_mode, std::string &suggested_primary) override |
Executed after view install and before primary election. More... | |
int | after_primary_election (std::string primary_uuid, enum_primary_election_primary_change_status primary_change_status, enum_primary_election_mode election_mode, int error) override |
Executed after primary election. More... | |
int | before_message_handling (const Plugin_gcs_message &message, const std::string &message_origin, bool *skip_message) override |
Executed before the message is processed. More... | |
Private Member Functions inherited from Group_event_observer | |
virtual | ~Group_event_observer ()=0 |
Private Attributes | |
my_thread_id | invoking_thread_id |
The thread that invoked this action - if applicable, 0 otherwise. More... | |
bool | multi_primary_switch_aborted |
Is the process aborted. More... | |
bool | action_killed |
Was this action order to terminate by a kill signal. More... | |
std::string | primary_uuid |
The current primary. More... | |
std::string | primary_gcs_id |
The id of the primary. More... | |
bool | is_primary |
If the member is primary. More... | |
bool | is_primary_transaction_queue_applied |
Is the primary transaction back log consumed. More... | |
std::shared_ptr< Continuation > | applier_checkpoint_condition |
Continuation object to wait on the applier queue consumption. More... | |
mysql_mutex_t | notification_lock |
The lock for notifications. More... | |
mysql_cond_t | notification_cond |
The condition for notifications. More... | |
Group_action_diagnostics | execution_message_area |
Place to store result messages. More... | |
Additional Inherited Members | |
Public Types inherited from Group_action | |
enum | enum_action_execution_result { GROUP_ACTION_RESULT_TERMINATED = 0 , GROUP_ACTION_RESULT_ERROR = 1 , GROUP_ACTION_RESULT_RESTART = 2 , GROUP_ACTION_RESULT_ABORTED = 3 , GROUP_ACTION_RESULT_KILLED = 4 , GROUP_ACTION_RESULT_END = 5 } |
Enum for the end results of a action execution. More... | |
The group action class to do migration to multi primary mode.
Multi_primary_migration_action::Multi_primary_migration_action | ( | ) |
Create a new primary election action.
Multi_primary_migration_action::Multi_primary_migration_action | ( | my_thread_id | invoking_thread_id | ) |
Create a new primary election action.
invoking_thread_id | the local thread id that is invoking this action |
|
override |
|
overrideprivatevirtual |
Executed after primary election.
primary_uuid | the elected primary |
primary_change_status | if the primary changed after the election |
election_mode | what was the election mode |
error | if there was and error on the process |
Implements Group_event_observer.
|
overrideprivatevirtual |
Executed after view install and before primary election.
joining | members joining the group | |
leaving | members leaving the group | |
group | members in the group | |
is_leaving | is the member leaving | |
[out] | skip_election | skip primary election on view |
[out] | election_mode | election mode |
[out] | suggested_primary | what should be the next primary to elect |
Implements Group_event_observer.
|
overrideprivatevirtual |
Executed before the message is processed.
message | The GCS message | |
message_origin | The member that sent this message (address) | |
[out] | skip_message | skip message handling if true |
Implements Group_event_observer.
|
overridevirtual |
Execute the action.
invoking_member | is the member that invoked it |
stage_handler | the stage handler to report progress |
ctx | the notification context |
Wait for all packets in the applier module to be consumed. This safety check prevents certification enabling packets from being read while this process executes
Implements Group_action.
|
overridevirtual |
Get the message with parameters to this action.
[out] | message | the message to start the action |
Implements Group_action.
|
overridevirtual |
For this action, what is the PSI key for the last stage when the action is terminating.
Reimplemented from Group_action.
|
overridevirtual |
Gets the info about execution, be it success or failure.
Implements Group_action.
|
private |
Log the result of the execution.
aborted | was the action aborted? |
mode_changed | was the mode changed to multi primary? |
|
private |
Persist the value of the variables changed in the action.
|
overridevirtual |
Implements Group_action.
|
overridevirtual |
Implements Group_action.
|
private |
Was this action order to terminate by a kill signal.
|
private |
Continuation object to wait on the applier queue consumption.
|
private |
Place to store result messages.
|
private |
The thread that invoked this action - if applicable, 0 otherwise.
|
private |
If the member is primary.
|
private |
Is the primary transaction back log consumed.
|
private |
Is the process aborted.
|
private |
The condition for notifications.
|
private |
The lock for notifications.
|
private |
The id of the primary.
|
private |
The current primary.