24#ifndef GCS_EVENT_HANDLERS_INCLUDE
25#define GCS_EVENT_HANDLERS_INCLUDE
69 ulong components_stop_timeout);
80 const std::vector<Gcs_member_identifier> &members,
81 const std::vector<Gcs_member_identifier> &unreachable)
const override;
122 const std::string &message_origin)
const;
128 bool is_joining,
bool is_leaving)
const;
130 bool is_leaving)
const;
132 bool is_leaving)
const;
147 const std::vector<Gcs_member_identifier> &members,
164 std::string &suggested_primary)
const;
167 bool is_joining)
const;
252 std::string &group_action_running_initiator,
253 std::string &group_action_running_description)
const;
299 std::string &all_hosts,
300 std::string &primary_host)
const;
316 std::set<Group_member_info *, Group_member_info_pointer_comparator>
Definition: applier.h:276
Definition: compatibility_module.h:41
This interface is implemented by those who wish to receive messages.
Definition: gcs_communication_event_listener.h:36
This interface is implemented by those who wish to receive Control Interface notifications.
Definition: gcs_control_event_listener.h:52
It represents the identity of a group member within a certain group.
Definition: gcs_member_identifier.h:40
This class serves as data container for information flowing in the GCS ecosystem.
Definition: gcs_message.h:48
Class that represents the data that is exchanged within a group.
Definition: gcs_message.h:357
This represents the membership view that a member has from a group.
Definition: gcs_view.h:55
Definition: member_info.h:82
Group_member_status
Definition: member_info.h:173
bool has_lower_uuid(Group_member_info *other)
Return true if server uuid is lower than other member server uuid.
Definition: member_info.cc:928
A convenience context class used to share information between the event handlers and the notifier.
Definition: notification.h:35
Definition: gcs_event_handlers.h:59
bool was_member_expelled_from_group(const Gcs_view &view) const
This method checks if member was expelled from the group due to network failures.
Definition: gcs_event_handlers.cc:967
void handle_single_primary_message(Plugin_gcs_message *processed_message) const
Definition: gcs_event_handlers.cc:432
void handle_transaction_prepared_message(const Gcs_message &message) const
Definition: gcs_event_handlers.cc:248
void handle_transactional_message(const Gcs_message &message) const
Definition: gcs_event_handlers.cc:184
void handle_leader_election_if_needed(enum_primary_election_mode election_mode, std::string &suggested_primary) const
This method handles the election of a new primary node when the plugin runs in single primary mode.
Definition: gcs_event_handlers.cc:990
int update_group_info_manager(const Gcs_view &new_view, const Exchanged_data &exchanged_data, bool is_joining, bool is_leaving) const
Definition: gcs_event_handlers.cc:1006
Gcs_message_data * get_exchangeable_data() const override
This method is called when the Data Exchange is about to happen in order for the client to provide wh...
Definition: gcs_event_handlers.cc:1573
void handle_sync_before_execution_message(const Gcs_message &message) const
Definition: gcs_event_handlers.cc:282
int process_local_exchanged_data(const Exchanged_data &exchanged_data, bool is_joining) const
Definition: gcs_event_handlers.cc:1419
void get_hosts_from_view(const std::vector< Gcs_member_identifier > &members, std::string &all_hosts, std::string &primary_host) const
This function return all members present in vector of Gcs_member_identifier in HOST:PORT format separ...
Definition: gcs_event_handlers.cc:786
void handle_joining_members(const Gcs_view &new_view, bool is_joining, bool is_leaving) const
Definition: gcs_event_handlers.cc:1093
void handle_leaving_members(const Gcs_view &new_view, bool is_joining, bool is_leaving) const
Definition: gcs_event_handlers.cc:1373
void handle_recovery_metadata(const Gcs_message &message) const
Definition: gcs_event_handlers.cc:493
void on_suspicions(const std::vector< Gcs_member_identifier > &members, const std::vector< Gcs_member_identifier > &unreachable) const override
This member function is called when the set of suspicions has changed in the underlying communication...
Definition: gcs_event_handlers.cc:648
void disable_read_mode_for_compatible_members(bool force_check=false) const
This function disable read-only mode when member version is compatible with group.
Definition: gcs_event_handlers.cc:2134
void handle_group_action_message(const Gcs_message &message) const
Definition: gcs_event_handlers.cc:459
Compatibility_module * compatibility_manager
Definition: gcs_event_handlers.h:319
bool set_number_of_members_on_view_changed_to_10
Definition: gcs_event_handlers.h:328
Plugin_gcs_events_handler(Applier_module_interface *applier_module, Recovery_module *recovery_module, Compatibility_module *compatibility_manager, ulong components_stop_timeout)
Plugin_gcs_events_handler constructor.
Definition: gcs_event_handlers.cc:55
ulong stop_wait_timeout
Definition: gcs_event_handlers.h:325
bool pre_process_message(Plugin_gcs_message *plugin_message, const std::string &message_origin) const
This method passes the message to message listeners.
Definition: gcs_event_handlers.cc:175
void on_message_received(const Gcs_message &message) const override
This method is called whenever a message is to be delivered.
Definition: gcs_event_handlers.cc:79
void handle_recovery_message(Plugin_gcs_message *message) const
Definition: gcs_event_handlers.cc:327
st_compatibility_types check_version_compatibility_with_group() const
When the member is joining, cycle through all members on group and see if it is compatible with them.
Definition: gcs_event_handlers.cc:1806
Recovery_module * recovery_module
Definition: gcs_event_handlers.h:310
int check_group_compatibility(size_t number_of_members) const
Checks the compatibility of the member with the group.
Definition: gcs_event_handlers.cc:1732
void handle_certifier_message(const Gcs_message &message) const
Definition: gcs_event_handlers.cc:302
bool is_member_on_vector(const std::vector< Gcs_member_identifier > &members, const Gcs_member_identifier &member_id) const
Verifies if a certain Vector of Member Ids contains a given member id.
Definition: gcs_event_handlers.cc:1409
bool is_group_running_a_primary_election() const
Check if the group is running a primary election.
Definition: gcs_event_handlers.cc:2119
Applier_module_interface * applier_module
Definition: gcs_event_handlers.h:309
void leave_group_on_recovery_metadata_error(std::string error_message) const
Leave group on recovering metadata error.
Definition: gcs_event_handlers.cc:638
void log_members_joining_message(const Gcs_view &new_view) const
Logs member joining message to error logs from view.
Definition: gcs_event_handlers.cc:774
void on_view_changed(const Gcs_view &new_view, const Exchanged_data &exchanged_data) const override
This method is called when the view is ready to be installed.
Definition: gcs_event_handlers.cc:824
bool is_group_running_a_configuration_change(std::string &group_action_running_initiator, std::string &group_action_running_description) const
Check if a member is not entering a group where an action is running.
Definition: gcs_event_handlers.cc:2099
void collect_members_executed_sets(View_change_packet *view_packet) const
This method takes all the group executed sets and adds those belonging to non recovering member to th...
Definition: gcs_event_handlers.cc:1955
void log_messages_during_member_leave(const Gcs_view &new_view) const
Logs member leaving message to error logs from view.
Definition: gcs_event_handlers.cc:732
Notification_context m_notification_ctx
The notification context for the GCS delivery thread.
Definition: gcs_event_handlers.h:332
~Plugin_gcs_events_handler() override
Definition: gcs_event_handlers.cc:74
void handle_transactional_with_guarantee_message(const Gcs_message &message) const
Definition: gcs_event_handlers.cc:211
void update_member_status(const std::vector< Gcs_member_identifier > &members, Group_member_info::Group_member_status status, Group_member_info::Group_member_status old_equal_to, Group_member_info::Group_member_status old_different_from) const
This method updates the status of the members in the list according to the given parameters.
Definition: gcs_event_handlers.cc:1689
void handle_stats_message(const Gcs_message &message) const
Definition: gcs_event_handlers.cc:418
int compare_member_transaction_sets() const
Method that compares the group's aggregated GTID set against the joiner GTID set.
Definition: gcs_event_handlers.cc:1881
st_compatibility_types * joiner_compatibility_status
The status of this member when it joins.
Definition: gcs_event_handlers.h:322
std::set< Group_member_info *, Group_member_info_pointer_comparator > * temporary_states
Definition: gcs_event_handlers.h:317
int compare_member_option_compatibility() const
Method that compares the member options with the value of the same option on all other members.
Definition: gcs_event_handlers.cc:1979
void set_stop_wait_timeout(ulong timeout)
Sets the component stop timeout.
Definition: gcs_event_handlers.h:88
This is the base GCS plugin message.
Definition: gcs_plugin_messages.h:64
Definition: recovery.h:39
A packet to send view change related info to the applier.
Definition: pipeline_interfaces.h:116
st_compatibility_types
Definition: compatibility_module.h:33
std::vector< std::pair< Gcs_member_identifier *, Gcs_message_data * > > Exchanged_data
Alias for the Data exchanged and delivered from all nodes.
Definition: gcs_control_event_listener.h:40
static bool timeout(bool(*wait_condition)())
Timeout function.
Definition: log0meb.cc:498
enum_primary_election_mode
Enum for election types.
Definition: primary_election_include.h:33
required uint32 status
Definition: replication_asynchronous_connection_failover.proto:61
Group_member_info_pointer_comparator to guarantee uniqueness.
Definition: gcs_event_handlers.h:47
bool operator()(Group_member_info *one, Group_member_info *other) const
Definition: gcs_event_handlers.h:48