24#ifndef PRIMARY_ELECTION_VALIDATION_HANDLER_INCLUDED
25#define PRIMARY_ELECTION_VALIDATION_HANDLER_INCLUDED
81 std::string &valid_uuid,
82 std::string &error_msg);
103 std::string &uuid, std::string &error_msg);
118 const std::vector<Gcs_member_identifier> &leaving,
119 const std::vector<Gcs_member_identifier> &group,
120 bool is_leaving,
bool *skip_election,
122 std::string &suggested_primary)
override;
124 std::string primary_uuid,
128 const std::string &message_origin,
129 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: primary_election_validation_handler.h:32
enum_primary_validation_result validate_group_slave_channels(std::string &uuid)
Check which members have slave channels.
Definition: primary_election_validation_handler.cc:245
void terminates_validation_structures()
Cleans the membership info, and pending notifications.
Definition: primary_election_validation_handler.cc:79
uint number_of_responses
The number of members that sent info or left.
Definition: primary_election_validation_handler.h:135
bool prepare_election()
Shares information among members about weights and channels in all members.
Definition: primary_election_validation_handler.cc:159
bool validation_process_aborted
Was the validation process aborted.
Definition: primary_election_validation_handler.h:132
enum_primary_validation_result validate_primary_version(std::string &uuid, std::string &error_msg)
Check that the group members have valid versions.
Definition: primary_election_validation_handler.cc:106
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_validation_handler.cc:317
enum_primary_validation_result validate_election(std::string &uuid, std::string &valid_uuid, std::string &error_msg)
Validate group for election.
Definition: primary_election_validation_handler.cc:189
Primary_election_validation_handler()
Constructor.
Definition: primary_election_validation_handler.cc:39
mysql_cond_t notification_cond
The condition for notifications.
Definition: primary_election_validation_handler.h:143
enum_primary_validation_result validate_primary_uuid(std::string &uuid)
Check that the UUID is valid and present in the group.
Definition: primary_election_validation_handler.cc:89
bool initialize_validation_structures()
Initialize the group member structures and registers an observer.
Definition: primary_election_validation_handler.cc:52
void abort_validation_process()
Interrupt the validation process in case of an abort.
Definition: primary_election_validation_handler.cc:266
~Primary_election_validation_handler() override
Destructor.
Definition: primary_election_validation_handler.cc:47
enum_primary_validation_result
Enum for the end results of validation.
Definition: primary_election_validation_handler.h:35
@ CURRENT_PRIMARY
Definition: primary_election_validation_handler.h:38
@ INVALID_PRIMARY
Definition: primary_election_validation_handler.h:37
@ VALID_PRIMARY
Definition: primary_election_validation_handler.h:36
@ GROUP_SOLO_PRIMARY
Definition: primary_election_validation_handler.h:39
mysql_mutex_t notification_lock
The lock for notifications.
Definition: primary_election_validation_handler.h:141
std::map< const std::string, Election_member_info * > group_members_info
The information about the group members <address,member>
Definition: primary_election_validation_handler.h:138
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_validation_handler.cc:275
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_validation_handler.cc:311
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
unsigned int uint
Definition: uca9-dump.cc:75