24#ifndef PRIMARY_ELECTION_SECONDARY_PROCESS_INCLUDED
25#define PRIMARY_ELECTION_SECONDARY_PROCESS_INCLUDED
92 const std::vector<Gcs_member_identifier> &leaving,
93 const std::vector<Gcs_member_identifier> &group,
94 bool is_leaving,
bool *skip_election,
96 std::string &suggested_primary)
override;
102 const std::string &message_origin,
103 bool *skip_message)
override;
Class that others can extend to receive notifications about views and primary elections.
Definition: group_event_observer.h:40
This is the base GCS plugin message.
Definition: gcs_plugin_messages.h:64
Definition: stage_monitor_handler.h:30
Class that contains the primary election process logic for secondary members.
Definition: primary_election_secondary_process.h:40
int secondary_election_process_handler()
Definition: primary_election_secondary_process.cc:119
int terminate_election_process(bool wait=true)
Terminate the election process on shutdown.
Definition: primary_election_secondary_process.cc:406
my_thread_handle primary_election_pthd
The thread handle.
Definition: primary_election_secondary_process.h:155
~Primary_election_secondary_process() override
Class destructor for secondary election process.
Definition: primary_election_secondary_process.cc:50
enum_primary_election_mode election_mode
The election invocation context.
Definition: primary_election_secondary_process.h:132
std::list< std::string > known_members_addresses
The members known for the current action.
Definition: primary_election_secondary_process.h:140
bool election_process_aborted
Is the process aborted.
Definition: primary_election_secondary_process.h:120
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: primary_election_secondary_process.cc:343
bool is_waiting_on_read_mode_group
Process is waiting on read mode - stage related var.
Definition: primary_election_secondary_process.h:129
void set_stop_wait_timeout(ulong timeout)
Sets the component stop timeout.
Definition: primary_election_secondary_process.cc:55
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: primary_election_secondary_process.cc:286
ulong number_of_know_members
The number of known members when the election started.
Definition: primary_election_secondary_process.h:138
thread_state election_process_thd_state
The election thread status.
Definition: primary_election_secondary_process.h:118
Plugin_stage_monitor_handler * stage_handler
The stage handler for progress reporting.
Definition: primary_election_secondary_process.h:143
std::string primary_uuid
The primary to be elected.
Definition: primary_election_secondary_process.h:135
bool enable_read_mode_on_server()
Enables the read mode in the server.
Definition: primary_election_secondary_process.cc:265
mysql_mutex_t election_lock
The thread run lock.
Definition: primary_election_secondary_process.h:151
ulong stop_wait_timeout
Definition: primary_election_secondary_process.h:146
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: primary_election_secondary_process.cc:349
bool group_in_read_mode
Are all group members in read mode.
Definition: primary_election_secondary_process.h:127
bool waiting_on_old_primary_transactions
Waiting for old primary transaction execution.
Definition: primary_election_secondary_process.h:123
bool primary_ready
Definition: primary_election_secondary_process.h:125
Primary_election_secondary_process()
Class constructor for secondary election process.
Definition: primary_election_secondary_process.cc:36
mysql_cond_t election_cond
The thread run condition.
Definition: primary_election_secondary_process.h:153
int launch_secondary_election_process(enum_primary_election_mode election_mode, std::string &primary_to_elect, Group_member_info_list *group_members_info)
Launch the local process on the secondary members for primary election.
Definition: primary_election_secondary_process.cc:59
bool is_election_process_running()
Is the election process running?
Definition: primary_election_secondary_process.cc:261
bool signal_read_mode_ready()
Signal that the read mode is ready on this member.
Definition: primary_election_secondary_process.cc:280
std::vector< Group_member_info *, Malloc_allocator< Group_member_info * > > Group_member_info_list
Definition: member_info.h:771
static bool timeout(bool(*wait_condition)())
Timeout function.
Definition: log0meb.cc:498
static int wait(mysql_cond_t *that, mysql_mutex_t *mutex_arg, const char *, unsigned int)
Definition: mysql_cond_v1_native.cc:63
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
Definition: my_thread_bits.h:58
An instrumented cond structure.
Definition: mysql_cond_bits.h:50
An instrumented mutex structure.
Definition: mysql_mutex_bits.h:50
Definition: plugin_utils.h:48