24#ifndef MULTI_PRIMARY_MIGRATION_INCLUDED
25#define MULTI_PRIMARY_MIGRATION_INCLUDED
65 const std::string &message_origin)
override;
117 const std::vector<Gcs_member_identifier> &leaving,
118 const std::vector<Gcs_member_identifier> &group,
119 bool is_leaving,
bool *skip_election,
121 std::string &suggested_primary)
override;
127 const std::string &message_origin,
128 bool *skip_message)
override;
The parent class for group wide operations.
Definition: group_action.h:35
Definition: group_action_message.h:33
The parent class for group wide operations.
Definition: group_action.h:139
enum_action_execution_result
Enum for the end results of a action execution.
Definition: group_action.h:142
Class that others can extend to receive notifications about views and primary elections.
Definition: group_event_observer.h:40
The group action class to do migration to multi primary mode.
Definition: multi_primary_migration_action.h:37
void log_result_execution(bool aborted, bool mode_changed)
Log the result of the execution.
Definition: multi_primary_migration_action.cc:370
int process_action_message(Group_action_message &message, const std::string &message_origin) override
Definition: multi_primary_migration_action.cc:71
bool is_primary_transaction_queue_applied
Is the primary transaction back log consumed.
Definition: multi_primary_migration_action.h:145
my_thread_id invoking_thread_id
The thread that invoked this action - if applicable, 0 otherwise.
Definition: multi_primary_migration_action.h:131
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.
Definition: multi_primary_migration_action.cc:312
int before_message_handling(const Plugin_gcs_message &message, const std::string &message_origin, bool *skip_message) override
Executed before the message is processed.
Definition: multi_primary_migration_action.cc:318
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.
Definition: multi_primary_migration_action.cc:284
std::shared_ptr< Continuation > applier_checkpoint_condition
Continuation object to wait on the applier queue consumption.
Definition: multi_primary_migration_action.h:148
~Multi_primary_migration_action() override
Definition: multi_primary_migration_action.cc:60
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.
Definition: multi_primary_migration_action.cc:280
Group_action::enum_action_execution_result execute_action(bool invoking_member, Plugin_stage_monitor_handler *stage_handler, Notification_context *ctx) override
Execute the action.
Definition: multi_primary_migration_action.cc:100
bool action_killed
Was this action order to terminate by a kill signal.
Definition: multi_primary_migration_action.h:136
mysql_mutex_t notification_lock
The lock for notifications.
Definition: multi_primary_migration_action.h:151
Group_action_diagnostics execution_message_area
Place to store result messages.
Definition: multi_primary_migration_action.h:156
Group_action_diagnostics * get_execution_info() override
Gets the info about execution, be it success or failure.
Definition: multi_primary_migration_action.cc:275
bool multi_primary_switch_aborted
Is the process aborted.
Definition: multi_primary_migration_action.h:134
Multi_primary_migration_action()
Create a new primary election action.
Definition: multi_primary_migration_action.cc:41
bool persist_variable_values()
Persist the value of the variables changed in the action.
Definition: multi_primary_migration_action.cc:343
std::string primary_uuid
The current primary.
Definition: multi_primary_migration_action.h:139
bool is_primary
If the member is primary.
Definition: multi_primary_migration_action.h:143
void get_action_message(Group_action_message **message) override
Get the message with parameters to this action.
Definition: multi_primary_migration_action.cc:65
mysql_cond_t notification_cond
The condition for notifications.
Definition: multi_primary_migration_action.h:153
std::string primary_gcs_id
The id of the primary.
Definition: multi_primary_migration_action.h:141
bool stop_action_execution(bool killed) override
Definition: multi_primary_migration_action.cc:264
A convenience context class used to share information between the event handlers and the notifier.
Definition: notification.h:35
This is the base GCS plugin message.
Definition: gcs_plugin_messages.h:64
Definition: stage_monitor_handler.h:30
unsigned int PSI_stage_key
Instrumented stage key.
Definition: psi_stage_bits.h:43
uint32 my_thread_id
Definition: my_thread_local.h:34
enum_primary_election_mode
Enum for election types.
Definition: primary_election_include.h:33
enum_primary_election_primary_change_status
Enum for primary change status.
Definition: primary_election_include.h:50
An instrumented cond structure.
Definition: mysql_cond_bits.h:50
An instrumented mutex structure.
Definition: mysql_mutex_bits.h:50