24#ifndef GCS_OPERATIONS_INCLUDE
25#define GCS_OPERATIONS_INCLUDE
257 bool skip_if_not_initialized =
false,
258 const THD *thd =
nullptr);
387 std::vector<Gcs_member_identifier> &preferred_leaders,
388 std::vector<Gcs_member_identifier> &actual_leaders);
This has the functionality of mysql_rwlock_t, with two differences:
Definition: rpl_gtid.h:325
This interface is implemented by those who wish to receive messages.
Definition: gcs_communication_event_listener.h:36
This interface represents all the communication facilities that a binding implementation should provi...
Definition: gcs_communication_interface.h:90
This interface is implemented by those who wish to receive Control Interface notifications.
Definition: gcs_control_event_listener.h:52
Group Replication implementation of Logger_interface.
Definition: gcs_logger.h:36
Definition: gcs_group_management_interface.h:32
This class is to be used to provide parameters to bindings in a transparent and generic way.
Definition: gcs_types.h:59
This interface must be implemented by all specific binding implementations as its entry point.
Definition: gcs_interface.h:101
It represents the identity of a group member within a certain group.
Definition: gcs_member_identifier.h:40
Implementation of Gcs_mysql_network_provider_auth_interface that retrieves auth data from MySQL.
Definition: gcs_mysql_network_provider.h:70
Internal implementation of Gcs_mysql_network_provider_native_interface_impl that serves as a proxy fo...
Definition: gcs_mysql_network_provider.h:218
Implementation of a.
Definition: gcs_mysql_network_provider.h:299
Coordinates all operations to GCS interface.
Definition: gcs_operations.h:49
void metrics_cache_reset()
Reset the metrics cache.
Definition: gcs_operations.cc:866
uint64_t get_last_consensus_end_timestamp()
Definition: gcs_operations.cc:1012
Gcs_group_management_interface * get_gcs_group_manager() const
Definition: gcs_operations.cc:588
bool is_initialized()
Returns a flag indicating whether or not the component is initialized.
Definition: gcs_operations.cc:846
static const std::string gcs_engine
Definition: gcs_operations.h:465
int get_local_member_identifier(std::string &identifier)
Get the local member identifier.
Definition: gcs_operations.cc:403
std::pair< bool, std::future< void > > set_protocol_version(Gcs_protocol_version gcs_protocol)
Modifies the GCS protocol version in use.
Definition: gcs_operations.cc:761
enum enum_gcs_error set_write_concurrency(uint32_t new_write_concurrency)
Reconfigures the group's "write concurrency" value.
Definition: gcs_operations.cc:629
Checkable_rwlock * view_observers_lock
Lock for the list of waiters on a view change.
Definition: gcs_operations.h:491
Gcs_view * get_current_view()
Get the group current view.
Definition: gcs_operations.cc:384
enum enum_gcs_error configure(const Gcs_interface_parameters ¶meters)
Configure the GCS interface.
Definition: gcs_operations.cc:129
enum enum_gcs_error join(const Gcs_communication_event_listener &communication_event_listener, const Gcs_control_event_listener &control_event_listener, Plugin_gcs_view_modification_notifier *view_notifier)
Request server to join the group.
Definition: gcs_operations.cc:199
Gcs_protocol_version get_protocol_version()
Retrieves the group's "group communication protocol" value.
Definition: gcs_operations.cc:737
enum enum_gcs_error send_transaction_message(Transaction_message_interface &message)
Send a transaction message to the group.
Definition: gcs_operations.cc:480
enum enum_gcs_error get_leaders(std::vector< Gcs_member_identifier > &preferred_leaders, std::vector< Gcs_member_identifier > &actual_leaders)
Inspect the group's "consensus leader" configuration.
Definition: gcs_operations.cc:669
void leave_coordination_member_left()
Declare the member as being already out of the group.
Definition: gcs_operations.cc:377
Gcs_communication_interface * get_gcs_communication() const
Definition: gcs_operations.cc:708
enum enum_gcs_error set_xcom_cache_size(uint64_t new_size)
Requests GCS to change the maximum size of the XCom cache.
Definition: gcs_operations.cc:778
uint32_t get_minimum_write_concurrency() const
Retrieves the minimum supported "write concurrency" value.
Definition: gcs_operations.cc:684
enum_leave_state
This enumeration describes the return values when a process tries to leave a group.
Definition: gcs_operations.h:57
@ ERROR_WHEN_LEAVING
Definition: gcs_operations.h:65
@ ALREADY_LEFT
Definition: gcs_operations.h:63
@ ALREADY_LEAVING
Definition: gcs_operations.h:61
@ NOW_LEAVING
Definition: gcs_operations.h:59
bool is_injected_view_modification()
Checks if the view modification is a injected one.
Definition: gcs_operations.cc:361
enum enum_gcs_error set_everyone_leader()
Reconfigures the group's "consensus leaders.".
Definition: gcs_operations.cc:656
std::atomic< bool > leave_coordination_left
Did the member already left.
Definition: gcs_operations.h:484
static const std::string & get_gcs_engine()
Definition: gcs_operations.cc:844
uint64_t get_total_messages_sent_count()
Definition: gcs_operations.cc:996
std::atomic< uint64_t > m_total_messages_sent_count
Definition: gcs_operations.h:609
enum enum_gcs_error set_debug_options(std::string &debug_options) const
Configure the debug options that shall be used by GCS.
Definition: gcs_operations.cc:186
std::atomic< uint64_t > m_last_consensus_end_timestamp
Definition: gcs_operations.h:610
std::atomic< uint64_t > m_all_consensus_proposals_count
Definition: gcs_operations.h:603
enum enum_gcs_error set_leader(Gcs_member_identifier const &leader)
Reconfigures the group's "consensus leaders.".
Definition: gcs_operations.cc:642
std::shared_ptr< Gcs_mysql_network_provider > gcs_mysql_net_provider
Definition: gcs_operations.h:475
Gcs_statistics_interface * get_statistics_interface()
Helper method that retrieves the binding implementation of the Statistics interface.
Definition: gcs_operations.cc:853
Gcs_operations()
Default constructor.
Definition: gcs_operations.cc:36
uint64_t get_all_consensus_proposals_count()
Definition: gcs_operations.cc:901
Gcs_gr_logger_impl gcs_logger
Definition: gcs_operations.h:466
void get_suspicious_count(std::list< Gcs_node_suspicious > &node_suspicious)
Definition: gcs_operations.cc:1028
void notify_of_view_change_end()
Notify all listeners that a view changed.
Definition: gcs_operations.cc:343
uint64_t get_extended_consensus_count()
Definition: gcs_operations.cc:980
void metrics_cache_update()
Update the metrics cache with the current GCS values.
Definition: gcs_operations.cc:878
Gcs_mysql_network_provider * get_mysql_network_provider()
Get the mysql network provider owned by GCS operations.
Definition: gcs_operations.cc:814
void remove_view_notifer(Plugin_gcs_view_modification_notifier *view_notifier)
Removes the notifier from the list.
Definition: gcs_operations.cc:368
Gcs_mysql_network_provider_native_interface_impl native_interface
Definition: gcs_operations.h:474
void notify_of_view_change_cancellation(int errnr=GROUP_REPLICATION_CONFIGURATION_ERROR)
Notify all listeners that a view was canceled.
Definition: gcs_operations.cc:352
void finalize()
Finalize the GCS interface.
Definition: gcs_operations.cc:107
enum enum_gcs_error do_set_debug_options(std::string &debug_options) const
Internal function that configures the debug options that shall be used by GCS.
Definition: gcs_operations.cc:162
enum enum_gcs_error get_write_concurrency(uint32_t &write_concurrency)
Retrieves the group's "write concurrency" value.
Definition: gcs_operations.cc:616
enum_force_members_state
This enumeration describes the return value when forces a new group membership.
Definition: gcs_operations.h:74
@ FORCE_MEMBERS_ER_VALUE_SET_ERROR
Definition: gcs_operations.h:89
@ FORCE_MEMBERS_ER_TIMEOUT_ON_WAIT_FOR_VIEW
Definition: gcs_operations.h:87
@ FORCE_MEMBERS_ER_MEMBER_NOT_ONLINE
Definition: gcs_operations.h:78
@ FORCE_MEMBERS_ER_NOT_ONLINE_AND_MAJORITY_UNREACHABLE
Definition: gcs_operations.h:83
@ FORCE_MEMBERS_ER_INTERNAL_ERROR
Definition: gcs_operations.h:91
@ FORCE_MEMBERS_ER_MEMBERS_WHEN_LEAVING
Definition: gcs_operations.h:85
@ FORCE_MEMBERS_OK
Definition: gcs_operations.h:76
std::atomic< uint64_t > m_extended_consensus_count
Definition: gcs_operations.h:608
std::atomic< uint64_t > m_all_consensus_time_sum
Definition: gcs_operations.h:607
std::list< Plugin_gcs_view_modification_notifier * > view_change_notifier_list
List of associated view change notifiers waiting.
Definition: gcs_operations.h:487
enum enum_force_members_state force_members(const char *members, Plugin_gcs_view_modification_notifier *view_notifier)
Forces a new group membership, on which the excluded members will not receive a new view and will be ...
Definition: gcs_operations.cc:522
bool belongs_to_group()
Returns true if this server belongs to the group.
Definition: gcs_operations.cc:266
uint64_t get_consensus_bytes_sent_sum()
Definition: gcs_operations.cc:933
enum enum_gcs_error send_message(const Plugin_gcs_message &message, bool skip_if_not_initialized=false, const THD *thd=nullptr)
Send a message to the group.
Definition: gcs_operations.cc:425
std::atomic< uint64_t > m_consensus_bytes_received_sum
Definition: gcs_operations.h:606
Checkable_rwlock * gcs_operations_lock
Definition: gcs_operations.h:489
Gcs_protocol_version get_maximum_protocol_version()
Get the maximum protocol version currently supported by the group.
Definition: gcs_operations.cc:749
uint64_t get_empty_consensus_proposals_count()
Definition: gcs_operations.cc:917
std::atomic< bool > leave_coordination_leaving
Is the member leaving.
Definition: gcs_operations.h:482
std::atomic< uint64_t > m_consensus_bytes_sent_sum
Definition: gcs_operations.h:605
enum_leave_state leave(Plugin_gcs_view_modification_notifier *view_notifier)
Request GCS interface to leave the group.
Definition: gcs_operations.cc:284
Gcs_mysql_network_provider_auth_interface_impl auth_provider
External IoC dependencies for gcs_mysql_net_provider.
Definition: gcs_operations.h:473
std::atomic< uint64_t > m_empty_consensus_proposals_count
Definition: gcs_operations.h:604
uint32_t get_maximum_write_concurrency() const
Retrieves the maximum supported "write concurrency" value.
Definition: gcs_operations.cc:696
virtual ~Gcs_operations()
Destructor.
Definition: gcs_operations.cc:56
enum_transport_protocol get_current_incoming_connections_protocol()
Get the current incoming connections protocol stack configured in GCS.
Definition: gcs_operations.cc:796
uint64_t get_consensus_bytes_received_sum()
Definition: gcs_operations.cc:948
Gcs_interface * gcs_interface
Definition: gcs_operations.h:477
bool injected_view_modification
Was this view change injected.
Definition: gcs_operations.h:480
enum enum_gcs_error reconfigure(const Gcs_interface_parameters ¶meters)
Reconfigure the GCS interface, i.e.
Definition: gcs_operations.cc:150
uint64_t get_all_consensus_time_sum()
Definition: gcs_operations.cc:964
int initialize()
Initialize the GCS interface.
Definition: gcs_operations.cc:61
This interface represents all statistics that a binding implementation should provide.
Definition: gcs_statistics_interface.h:49
This represents the membership view that a member has from a group.
Definition: gcs_view.h:55
This is the base GCS plugin message.
Definition: gcs_plugin_messages.h:64
Definition: gcs_view_modification_notifier.h:36
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:36
Definition: transaction_message_interface.h:41
enum_gcs_error
This enumeration describes errors which can occur during group communication operations.
Definition: gcs_types.h:41
Gcs_protocol_version
The GCS protocol versions.
Definition: gcs_types.h:128
enum_transport_protocol
Enum that describes the available XCom Communication Stacks.
Definition: network_provider.h:45
#define GROUP_REPLICATION_CONFIGURATION_ERROR
Definition: plugin_constants.h:37