MySQL 8.4.0
Source Code Documentation
gcs_operations.h
Go to the documentation of this file.
1/* Copyright (c) 2016, 2024, Oracle and/or its affiliates.
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License, version 2.0,
5 as published by the Free Software Foundation.
6
7 This program is designed to work with certain software (including
8 but not limited to OpenSSL) that is licensed under separate terms,
9 as designated in a particular file or component or in included license
10 documentation. The authors of MySQL hereby grant you an additional
11 permission to link the program and your derivative works with the
12 separately licensed software that they have either included with
13 the program or referenced in the documentation.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License, version 2.0, for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24#ifndef GCS_OPERATIONS_INCLUDE
25#define GCS_OPERATIONS_INCLUDE
26
28#include <atomic>
29#include <future>
30#include <string>
31#include <utility>
32
39// TODO::change this for something more elegant
41
44
45/**
46 @class Gcs_operations
47 Coordinates all operations to GCS interface.
48*/
50 public:
51 /**
52 @enum enum_leave_state
53
54 This enumeration describes the return values when a process tries to leave
55 a group.
56 */
58 /* The request was accepted, the member should now be leaving. */
60 /* The member is already leaving, no point in retrying */
62 /* The member already left */
64 /* There was an error when trying to leave */
66 };
67
68 /**
69 @enum enum_force_members_state
70
71 This enumeration describes the return value when forces a new group
72 membership
73 */
75 /* OK. The forced new group membership is successful */
77 /* Error. The member is not ONLINE */
79 /*
80 Error. The member is not ONLINE and majority of the members are
81 unreachable.
82 */
84 /* Error. The member is leaving the group */
86 /* Timeout on wait for view after setting group_replication_force_members */
88 /* Error setting group_replication_force_members value */
90 /* Internal Error while setting group_replication_force_members */
92 };
93
94 /**
95 Default constructor.
96 */
98
99 /**
100 Destructor.
101 */
102 virtual ~Gcs_operations();
103
104 /**
105 Initialize the GCS interface.
106
107 @return the operation status
108 @retval 0 OK
109 @retval !=0 Error
110 */
111 int initialize();
112
113 /**
114 Finalize the GCS interface.
115 */
116 void finalize();
117
118 /**
119 Get the group current view.
120
121 @return a copy of the group current view.
122 NULL if member does not belong to a group..
123 The return value must deallocated by the caller.
124 */
126
127 /**
128 Configure the GCS interface.
129
130 @param[in] parameters The configuration parameters
131
132 @return the operation status
133 @retval 0 OK
134 @retval !=0 Error
135 */
136 enum enum_gcs_error configure(const Gcs_interface_parameters &parameters);
137
138 /**
139 Reconfigure the GCS interface, i.e. update its configuration parameters.
140
141 @param[in] parameters The configuration parameters
142
143 @return the operation status
144 @retval 0 OK
145 @retval !=0 Error
146 */
148
149 /**
150 Configure the debug options that shall be used by GCS.
151
152 @param debug_options Set of debug options separated by comma
153
154 @return the operation status
155 @retval 0 OK
156 @retval !=0 Error
157 */
158 enum enum_gcs_error set_debug_options(std::string &debug_options) const;
159
160 /**
161 Request server to join the group.
162
163 @param[in] communication_event_listener The communication event listener
164 @param[in] control_event_listener The control event listener
165 @param[in] view_notifier A view change notifier to know the response
166
167
168 @return the operation status
169 @retval 0 OK
170 @retval !=0 Error
171 */
172 enum enum_gcs_error join(
173 const Gcs_communication_event_listener &communication_event_listener,
174 const Gcs_control_event_listener &control_event_listener,
176
177 /**
178 Returns true if this server belongs to the group.
179 */
180 bool belongs_to_group();
181
182 /**
183 Request GCS interface to leave the group.
184
185 @param[in] view_notifier A view change notifier to know the response.
186 Pass a null pointer if you don't want to wait
187
188 Note: This method only asks to leave, it does not know if request was
189 successful
190
191 @return the operation status
192 @retval NOW_LEAVING Request accepted, the member is leaving
193 @retval ALREADY_LEAVING The member is already leaving
194 @retval ALREADY_LEFT The member already left
195 @retval ERROR_WHEN_LEAVING An error happened when trying to leave
196 */
198
199 /**
200 Notify all listeners that a view changed.
201 */
203
204 /**
205 Notify all listeners that a view was canceled.
206
207 @param[in] errnr The error associated to this view
208 */
211
212 /**
213 Checks if the view modification is a injected one.
214
215 @retval true if the current view modification is a injected one
216 @retval false otherwise
217 */
219
220 /**
221 Removes the notifier from the list
222 */
225
226 /**
227 Declare the member as being already out of the group.
228 */
230
231 /**
232 Get the local member identifier.
233
234 @param[out] identifier The local member identifier when the
235 method is successful
236
237 @return Operation status
238 @retval 0 OK
239 @retval !=0 Error
240 */
241 int get_local_member_identifier(std::string &identifier);
242
243 /**
244 Send a message to the group.
245
246 @param[in] message The message to send
247 @param[in] skip_if_not_initialized If true, the message will not be sent
248 and no errors will returned when the
249 GCS interface is not initialized
250 @param[in] thd Server thd represent client connection
251
252 @return the operation status
253 @retval 0 OK
254 @retval !=0 Error
255 */
257 bool skip_if_not_initialized = false,
258 const THD *thd = nullptr);
259
260 /**
261 Send a transaction message to the group.
262
263 @param[in] message The message to send
264
265 @return the operation status
266 @retval 0 OK
267 @retval !=0 Error
268 */
271
272 /**
273 Forces a new group membership, on which the excluded members
274 will not receive a new view and will be blocked.
275
276 @param members The list of members, comma
277 separated. E.g., host1:port1,host2:port2
278 @param view_notifier A view change notifier to know the response
279
280 @return Operation status
281 @retval FORCE_MEMBERS_OK The forced new group membership is
282 successful.
283 @retval FORCE_MEMBERS_ER_MEMBER_NOT_ONLINE
284 An error as member is not ONLINE,
285 when forcing a new group membership.
286 @retval FORCE_MEMBERS_NOT_ONLINE_AND_MAJORITY_UNREACHABLE
287 An error as member is not ONLINE and
288 majority of the members are
289 unreachable.
290 @retval FORCE_MEMBERS_ER_MEMBERS_WHEN_LEAVING
291 An error as member leaving group,
292 when forcing new group membership.
293 @retval FORCE_MEMBERS_ER_TIMEOUT_ON_WAIT_FOR_VIEW
294 A timeout happened when waiting for
295 view after setting
296 group_replication_force_members.
297 @retval FORCE_MEMBERS_VALUE_SET_ERROR
298 Error setting
299 group_replication_force_members value.
300 @retval FORCE_MEMBERS_INTERNAL_ERROR Internal error.
301 */
303 const char *members,
305
306 /**
307 Retrieves the minimum supported "write concurrency" value.
308 */
309 uint32_t get_minimum_write_concurrency() const;
310
311 /**
312 Retrieves the maximum supported "write concurrency" value.
313 */
314 uint32_t get_maximum_write_concurrency() const;
315
316 /**
317 Retrieves the group's "write concurrency" value.
318
319 @param[out] write_concurrency A reference to where the group's "write
320 concurrency" will be written to
321
322 @retval GCS_OK if successful
323 @retval GCS_NOK if unsuccessful
324 */
325 enum enum_gcs_error get_write_concurrency(uint32_t &write_concurrency);
326
327 /**
328 Reconfigures the group's "write concurrency" value.
329
330 The caller should ensure that the supplied value is between @c
331 minimum_write_concurrency and @c maximum_write_concurrency.
332
333 The method is non-blocking, meaning that it shall only send the
334 request to an underlying GCS. The final result can be polled via @c
335 get_write_concurrency.
336
337 @param new_write_concurrency The desired "write concurrency" value.
338
339 @retval GCS_OK if successful
340 @retval GCS_NOK if unsuccessful
341 */
342 enum enum_gcs_error set_write_concurrency(uint32_t new_write_concurrency);
343
344 /**
345 * @brief Reconfigures the group's "consensus leaders."
346 *
347 * Instructs the underlying GCS to use @c leader as the single preferred
348 * consensus leader.
349 *
350 * The method is non-blocking, meaning that it shall only send the
351 * request to an underlying GCS. The final result can be polled via @c
352 * get_leaders.
353 *
354 * @param leader The member you desire to act as a consensus leader.
355 *
356 * @retval GCS_OK if successful
357 * @retval GCS_NOK if unsuccessful
358 */
360
361 /**
362 * @brief Reconfigures the group's "consensus leaders."
363 *
364 * Instructs the underlying GCS to use every member as a consensus leader.
365 *
366 * The method is non-blocking, meaning that it shall only send the
367 * request to an underlying GCS. The final result can be polled via @c
368 * get_leaders.
369 *
370 * @retval GCS_OK if successful
371 * @retval GCS_NOK if unsuccessful
372 */
374
375 /**
376 * @brief Inspect the group's "consensus leader" configuration.
377 *
378 * @param[out] preferred_leaders The members specified as preferred leaders.
379 * @param[out] actual_leaders The members actually carrying out the leader
380 * role at this moment.
381 *
382 * @retval GCS_OK if successful, @c preferred_leaders and @c actual_leaders
383 * contain the result
384 * @retval GCS_NOK if unsuccessful
385 */
387 std::vector<Gcs_member_identifier> &preferred_leaders,
388 std::vector<Gcs_member_identifier> &actual_leaders);
389
390 /**
391 Retrieves the group's "group communication protocol" value.
392
393 @retval the protocol version
394 */
396
397 /**
398 Modifies the GCS protocol version in use.
399
400 The method is non-blocking. It returns a future on which the caller can
401 wait for the action to finish.
402
403 @param gcs_protocol The desired GCS protocol version
404
405 @retval {true, future} If successful
406 @retval {false, _} If unsuccessful because @c new_version is unsupported
407 */
408 std::pair<bool, std::future<void>> set_protocol_version(
409 Gcs_protocol_version gcs_protocol);
410
411 /**
412 Get the maximum protocol version currently supported by the group.
413
414 @returns the maximum protocol version currently supported by the group
415 */
417
418 /**
419 Requests GCS to change the maximum size of the XCom cache.
420
421 @param new_size The new maximum size of the XCom cache.
422
423 @retval GCS_OK if request successfully scheduled
424 @retval GCS_NOK if GCS is unable to schedule the request
425 */
426 enum enum_gcs_error set_xcom_cache_size(uint64_t new_size);
427
428 /**
429 * @brief Get the current incoming connections protocol stack configured in
430 * GCS
431 *
432 * @return GcsRunningProtocol
433 */
435
436 /**
437 * @brief Get the mysql network provider owned by GCS operations
438 *
439 * @return a Network_provider if initialized and running. nullptr, otherwise.
440 */
442
443 /**
444 * @return the communication engine being used
445 */
446 static const std::string &get_gcs_engine();
447
448 /**
449 Returns a flag indicating whether or not the component is initialized.
450
451 @retval true if the component is initialized.
452 @retval false otherwise.
453 */
454 bool is_initialized();
455
456 private:
457 /**
458 Internal function that configures the debug options that shall be used
459 by GCS.
460 */
461 enum enum_gcs_error do_set_debug_options(std::string &debug_options) const;
464
465 static const std::string gcs_engine;
467
468 /**
469 * External IoC dependencies for gcs_mysql_net_provider.
470 * - A provider for authentication parameters
471 * - A provider for all mysql native methods
472 */
475 std::shared_ptr<Gcs_mysql_network_provider> gcs_mysql_net_provider;
476
478
479 /** Was this view change injected */
481 /** Is the member leaving*/
482 std::atomic<bool> leave_coordination_leaving;
483 /** Did the member already left*/
484 std::atomic<bool> leave_coordination_left;
485
486 /** List of associated view change notifiers waiting */
487 std::list<Plugin_gcs_view_modification_notifier *> view_change_notifier_list;
488
490 /** Lock for the list of waiters on a view change */
492
493 /*
494 Metrics concurrency control and cached values to be provided
495 when the member does not belong to a group.
496 */
497 public:
498 /**
499 @see Gcs_statistics_interface::get_all_sucessful_proposal_rounds()
500
501 @details This method will try to acquire a read lock so that a
502 recent value is returned. If the lock acquire is not possible,
503 case on which there is a exclusive operation ongoing, a cached
504 value is returned.
505 */
507
508 /**
509 @see Gcs_statistics_interface::get_all_empty_proposal_rounds()
510
511 @details This method will try to acquire a read lock so that a
512 recent value is returned. If the lock acquire is not possible,
513 case on which there is a exclusive operation ongoing, a cached
514 value is returned.
515 */
517
518 /**
519 @see Gcs_statistics_interface::get_all_bytes_sent()
520
521 @details This method will try to acquire a read lock so that a
522 recent value is returned. If the lock acquire is not possible,
523 case on which there is a exclusive operation ongoing, a cached
524 value is returned.
525 */
527
528 /**
529 @see Gcs_statistics_interface::get_all_message_bytes_received()
530
531 @details This method will try to acquire a read lock so that a
532 recent value is returned. If the lock acquire is not possible,
533 case on which there is a exclusive operation ongoing, a cached
534 value is returned.
535 */
537
538 /**
539 @see Gcs_statistics_interface::get_cumulative_proposal_time()
540
541 @details This method will try to acquire a read lock so that a
542 recent value is returned. If the lock acquire is not possible,
543 case on which there is a exclusive operation ongoing, a cached
544 value is returned.
545 */
547
548 /**
549 @see Gcs_statistics_interface::get_all_full_proposal_count()
550
551 @details This method will try to acquire a read lock so that a
552 recent value is returned. If the lock acquire is not possible,
553 case on which there is a exclusive operation ongoing, a cached
554 value is returned.
555 */
557
558 /**
559 @see Gcs_statistics_interface::get_all_messages_sent()
560
561 @details This method will try to acquire a read lock so that a
562 recent value is returned. If the lock acquire is not possible,
563 case on which there is a exclusive operation ongoing, a cached
564 value is returned.
565 */
567
568 /**
569 @see Gcs_statistics_interface::get_last_proposal_round_time()
570
571 @details This method will try to acquire a read lock so that a
572 recent value is returned. If the lock acquire is not possible,
573 case on which there is a exclusive operation ongoing, a cached
574 value is returned.
575 */
577
578 /**
579 * @see Gcs_statistics_interface::get_suspicious_count()
580 */
581 void get_suspicious_count(std::list<Gcs_node_suspicious> &node_suspicious);
582
583 private:
584 /**
585 Helper method that retrieves the binding implementation of the
586 Statistics interface.
587
588 @return A valid reference to a gcs_statistics_interface implementation.
589 nullptr, in case of error or GCS interface not initialized.
590 */
592
593 /**
594 Reset the metrics cache.
595 */
596 void metrics_cache_reset();
597
598 /**
599 Update the metrics cache with the current GCS values.
600 */
602
603 std::atomic<uint64_t> m_all_consensus_proposals_count{0};
604 std::atomic<uint64_t> m_empty_consensus_proposals_count{0};
605 std::atomic<uint64_t> m_consensus_bytes_sent_sum{0};
606 std::atomic<uint64_t> m_consensus_bytes_received_sum{0};
607 std::atomic<uint64_t> m_all_consensus_time_sum{0};
608 std::atomic<uint64_t> m_extended_consensus_count{0};
609 std::atomic<uint64_t> m_total_messages_sent_count{0};
610 std::atomic<uint64_t> m_last_consensus_end_timestamp{0};
611};
612
613#endif /* GCS_OPERATIONS_INCLUDE */
This has the functionality of mysql_rwlock_t, with two differences:
Definition: rpl_gtid.h:324
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 &parameters)
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 &parameters)
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