MySQL 9.1.0
Source Code Documentation
recovery_state_transfer.h
Go to the documentation of this file.
1/* Copyright (c) 2015, 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 RECOVERY_STATE_TRANSFER_INCLUDE
25#define RECOVERY_STATE_TRANSFER_INCLUDE
26
28#include <string>
29#include <vector>
30
31#include "compression.h"
32#include "my_io.h"
37
40 STATE_TRANSFER_STOP, // Fail to stop replica threads
41 STATE_TRANSFER_PURGE, // Fail to purge replica threads
42 STATE_TRANSFER_NO_CONNECTION // No connection to donor
44
46 public:
47 /**
48 Recovery state transfer constructor
49 @param recovery_channel_name The channel name to be used
50 @param member_uuid This member uuid
51 @param channel_obsr_mngr The channel state observer manager
52 */
54 const std::string &member_uuid,
55 Channel_observation_manager *channel_obsr_mngr);
56
58
59 // Base methods: init / abort / end
60
61 /**
62 Initialize the state transfer class and reset the class flags
63
64 @param view_id The view id to use for the recovery.
65 @param is_vcle_enabled the flag determine if View_change_log_event
66 is enabled.
67
68 */
69 void initialize(const std::string &view_id, bool is_vcle_enabled);
70
71 /**
72 Set the gtids to use for the recovery until condition.
73
74 @param after_gtids the gtids to use for the recovery until condition.
75 */
76 void set_until_condition_after_gtids(const std::string &after_gtids);
77
78 /** Abort the state transfer */
80
81 /**
82 Signals that the data was received so the process can end.
83 */
84 void end_state_transfer();
85
86 // Methods for variable updates
87
88 /** Sets the number of times recovery tries to connect to a given donor */
89 void set_recovery_donor_retry_count(ulong retry_count) {
91 }
92
93 /** Sets the sleep time between connection attempts to all possible donors */
94 void set_recovery_donor_reconnect_interval(ulong reconnect_interval) {
95 donor_reconnect_interval = reconnect_interval;
96 }
97
98 /**
99 Sets all the SSL option to use on recovery.
100
101 @param use_ssl force the use of SSL on recovery connections
102 @param ssl_ca SSL trusted certificate authorities file
103 @param ssl_capath a directory with trusted CA files
104 @param ssl_cert the certificate file for secure connections
105 @param ssl_cipher the list of ciphers to use
106 @param ssl_key the SSL key file
107 @param ssl_crl SSL revocation list file
108 @param ssl_crlpath path with revocation list files
109 @param ssl_verify_server_cert verify the hostname against the certificate
110 @param tls_version the list of TLS versions to use
111 @param tls_ciphersuites the list of TLS ciphersuites to use
112 */
113 void set_recovery_ssl_options(bool use_ssl, const char *ssl_ca,
114 const char *ssl_capath, const char *ssl_cert,
115 const char *ssl_cipher, const char *ssl_key,
116 const char *ssl_crl, const char *ssl_crlpath,
117 bool ssl_verify_server_cert, char *tls_version,
118 char *tls_ciphersuites) {
119 recovery_use_ssl = use_ssl;
120 if (ssl_ca != nullptr) set_recovery_ssl_ca(ssl_ca);
121 if (ssl_capath != nullptr) set_recovery_ssl_capath(ssl_capath);
122 if (ssl_cert != nullptr) set_recovery_ssl_cert(ssl_cert);
123 if (ssl_cipher != nullptr) set_recovery_ssl_cipher(ssl_cipher);
124 if (ssl_key != nullptr) set_recovery_ssl_key(ssl_key);
125 if (ssl_crl != nullptr) set_recovery_ssl_crl(ssl_crl);
126 if (ssl_crlpath != nullptr) set_recovery_ssl_crl(ssl_crlpath);
128 if (tls_version != nullptr) set_recovery_tls_version(tls_version);
129 set_recovery_tls_ciphersuites(tls_ciphersuites);
130 }
131
132 /** Set the option that forces the use of SSL on recovery connections */
133 void set_recovery_use_ssl(char use_ssl) { this->recovery_use_ssl = use_ssl; }
134
135 /** Set a SSL trusted certificate authorities file */
136 void set_recovery_ssl_ca(const char *ssl_ca) {
137 memcpy(recovery_ssl_ca, ssl_ca, strlen(ssl_ca) + 1);
138 }
139
140 /** Set a folder with SSL trusted CA files */
141 void set_recovery_ssl_capath(const char *ssl_capath) {
142 memcpy(recovery_ssl_capath, ssl_capath, strlen(ssl_capath) + 1);
143 }
144
145 /** Set a SSL certificate for connection */
146 void set_recovery_ssl_cert(const char *ssl_cert) {
147 memcpy(recovery_ssl_cert, ssl_cert, strlen(ssl_cert) + 1);
148 }
149
150 /** Set a SSL ciphers to be used */
151 void set_recovery_ssl_cipher(const char *ssl_cipher) {
152 memcpy(recovery_ssl_cipher, ssl_cipher, strlen(ssl_cipher) + 1);
153 }
154
155 /** Set a SSL key for connections */
156 void set_recovery_ssl_key(const char *ssl_key) {
157 memcpy(recovery_ssl_key, ssl_key, strlen(ssl_key) + 1);
158 }
159
160 /** Set a SSL revocation list file*/
161 void set_recovery_ssl_crl(const char *ssl_crl) {
162 memcpy(recovery_ssl_crl, ssl_crl, strlen(ssl_crl) + 1);
163 }
164
165 /** Set a folder with SSL revocation list files*/
166 void set_recovery_ssl_crlpath(const char *ssl_crlpath) {
167 memcpy(recovery_ssl_crlpath, ssl_crlpath, strlen(ssl_crlpath) + 1);
168 }
169
170 /** Set if recovery shall compare the used hostname against the certificate */
173 }
174
175 /** Set a TLS versions to be used */
176 void set_recovery_tls_version(const char *tls_version) {
177 memcpy(recovery_tls_version, tls_version, strlen(tls_version) + 1);
178 }
179
180 /** Set a TLS ciphersuites to be used */
181 void set_recovery_tls_ciphersuites(const char *tls_ciphersuites) {
182 if (nullptr == tls_ciphersuites) {
184 } else {
186 memcpy(recovery_tls_ciphersuites, tls_ciphersuites,
187 strlen(tls_ciphersuites) + 1);
188 }
189 }
190
191 /**
192 @return Is recovery configured to use SSL
193 */
194 bool get_recovery_use_ssl() { return this->recovery_use_ssl; }
195
196 /**
197 Get SSL options configured for recovery
198
199 @param[out] ssl_ca the ssl ca
200 @param[out] ssl_cert the ssl cert
201 @param[out] ssl_key the ssl key
202 */
203 void get_recovery_base_ssl_options(std::string *ssl_ca, std::string *ssl_cert,
204 std::string *ssl_key) {
205 ssl_ca->assign(recovery_ssl_ca);
206 ssl_cert->assign(recovery_ssl_cert);
207 ssl_key->assign(recovery_ssl_key);
208 }
209
210 /**
211 Sets the recovery shutdown timeout.
212
213 @param[in] timeout the timeout
214 */
217 }
218
219 /** Set a public key file*/
220 void set_recovery_public_key_path(const char *public_key_path) {
221 if (public_key_path != nullptr) {
222 memcpy(recovery_public_key_path, public_key_path,
223 strlen(public_key_path) + 1);
224 }
225 }
226
227 /** Get preference to get public key */
229
230 /** Set compression algorithm */
232 memcpy(recovery_compression_algorithm, name, strlen(name) + 1);
233 }
234
235 /** Set compression level */
238 }
239
240 // Methods that update the state transfer process
241
242 /** This method initializes the group membership info */
244
245 /**
246 This method decides what action to take when a member exits the group.
247 If the donor left, and the state transfer is still ongoing, then pick a
248 new one and restart the transfer.
249
250 @param did_members_left states if members left the view
251
252 @return the operation status
253 @retval 0 OK
254 @retval !=0 Error
255 */
256 int update_recovery_process(bool did_members_left);
257
258 /**
259 Method that informs recovery that the donor channel applier was stopped.
260
261 @param thread_id the applier thread id
262 @param aborted if the applier was aborted or stopped
263 */
265
266 /**
267 Method that informs recovery that the donor channel receiver was stopped.
268
269 @param thread_id the applier thread id
270 */
272
273 // Status methods
274
275 /**
276 Checks if the given id matches the recovery applier thread
277 @param id the thread id
278
279 @return if it belongs to a thread
280 @retval true the id matches a SQL or worker thread
281 @retval false the id doesn't match any thread
282 */
284
285 /**
286 Checks to see if the recovery IO/SQL thread is still running, probably caused
287 by an timeout on shutdown.
288 If the threads are still running, we try to stop them again.
289 If not possible, an error is reported.
290
291 @return are the threads stopped
292 @retval 0 All is stopped.
293 @retval !=0 Threads are still running
294 */
296
297 // class core method
298
299 /**
300 Execute state transfer
301 @param stage_handler Stage handler to update the system tables
302
303 @return the operation status
304 @retval 0 OK
305 @retval !=0 Recovery state transfer failed
306 */
308 Plugin_stage_monitor_handler &stage_handler);
309
310 private:
311 /**
312 Removes the old list of group members and enquires about the current members
313
314 @param[in] update_donor update the selected donor pointer when updating
315 */
316 void update_group_membership(bool update_donor);
317
318 /**
319 Based on the group list, build a random order list with all suitable donors.
320
321 @param selected_donor the current selected donor to update its pointer
322 */
323 void build_donor_list(std::string *selected_donor);
324
325 /** Method that sets the failover status to true and awakes recovery */
326 void donor_failover();
327
328 /**
329 Verify member has after_gtids received from replication donor already
330 present in member's gtid_executed.
331
332 @param local_gtid_executed_string the local member gtid_executed string
333
334 @return the operation status
335 @retval true after_gtids there in member's gtid_executed.
336 @retval false after_gtids not there in member's gtid_executed.
337 */
339 std::string &local_gtid_executed_string);
340
341 /**
342 Establish a master/slave connection to the selected donor.
343
344 @return the operation status
345 @retval 0 OK
346 @retval !=0 Error
347 */
349
350 /**
351 Initializes the structures for the donor connection threads.
352 Recovery channel is always purged.
353
354 @param hostname hostname of current selected donor
355 @param port port of current selected donor
356
357 @return the operation status
358 @retval 0 OK
359 @retval !=0 Error
360 */
361 int initialize_donor_connection(std::string hostname, uint port);
362
363 /**
364 Initializes the connection parameters for the donor connection.
365
366 @retval false Everything OK
367 @retval true In case of the selected donor is not available
368 */
370
371 /**
372 Starts the recovery slave threads to receive data from the donor.
373
374 @return the operation status
375 @retval 0 OK
376 @retval !=0 Error
377 */
379
380 /**
381 Terminates the connection to the donor
382
383 @param purge_logs purge recovery logs
384
385 @return the operation status
386 @retval STATE_TRANSFER_OK OK
387 @retval !=STATE_TRANSFER_OK Error
388 */
390 bool purge_logs = true);
391
392 /**
393 Purges relay logs and the master info object
394
395 @return the operation status
396 @retval 0 OK
397 @retval REPLICATION_THREAD_REPOSITORY_RL_PURGE_ERROR
398 Error when purging the relay logs
399 @retval REPLICATION_THREAD_REPOSITORY_MI_PURGE_ERROR
400 Error when cleaning the master info repository
401 */
403
404 private:
405 /**
406 Verifies if after_gtids sent by sender is successfully applied when recovery
407 is using CHANNEL_UNTIL_APPLIER_AFTER_GTIDS for start replica until condition
408
409 @retval false after_gtids is successfully applied.
410 @retval true Error in applying after_gtids.
411 */
413
414 /** The recovery channel name */
416
417 /* The member uuid*/
418 std::string member_uuid;
419
420 /* The associated view id for the current recovery session */
421 std::string view_id;
422
423 /* The gtids used by the replication until condition for the recovery. */
424 std::string m_after_gtids;
425
426 /*
427 The replication until condition that can be applied to
428 channels for the recovery.
429 */
431
432 /* The selected donor member*/
434 /* The selected donor member hostname */
436 /* Vector with group members info*/
438 /* Member with suitable donors for use on recovery*/
440
441 /* Retry count on donor connections*/
443
444 /* Recovery abort flag */
446 /* Flag that signals when the donor transferred all its data */
448 /* Are we successfully connected to a donor*/
450 /* Are we on failover mode*/
452 /* Did an error happened in one of the threads*/
454
455 // Recovery connection related structures
456
457 /** Interface class to interact with the donor connection threads*/
459
460 /* The plugin's control module for channel status observation */
462
463 /* The recovery channel state observer */
465
466 /** If the use of SSL is obligatory on recovery connections */
468 /** Get public key */
470 /** The configured SSL trusted certificate authorities file */
472 /** The configured directory that contains trusted SSL CA files*/
474 /** The configured SSL certificate file to use for a secure connection*/
476 /** The configured SSL list of permissible ciphers to use for encryption.*/
478 /** The configured SSL key file to use for establishing a secure connection.*/
480 /** The configured SSL file containing certificate revocation lists*/
482 /** The configured directory that contains certificate revocation list files*/
484 /** If the server's Common Name value checks against donor sent certificate.*/
486 /** Public key information */
488 /** Permitted TLS versions. */
490 /** Permitted TLS 1.3 ciphersuites. */
493
494 /* The lock for the recovery wait condition */
496 /* The condition for the recovery wait */
499
500 /* Recovery max number of retries due to failures*/
502 /* Sleep time between connection attempts to all possible donors*/
504 /* compression algorithm to be used for communication */
506 /* compression level to be used for compression */
508};
509#endif /* RECOVERY_INCLUDE */
A class to register observers for channel state events.
Definition: channel_observation_manager.h:131
A interface class to code channel state response methods.
Definition: channel_observation_manager.h:38
Definition: member_info.h:82
Definition: stage_monitor_handler.h:30
Definition: recovery_state_transfer.h:45
char recovery_tls_ciphersuites[FN_REFLEN]
Definition: recovery_state_transfer.h:492
bool recovery_tls_ciphersuites_null
Permitted TLS 1.3 ciphersuites.
Definition: recovery_state_transfer.h:491
void set_recovery_donor_reconnect_interval(ulong reconnect_interval)
Sets the sleep time between connection attempts to all possible donors.
Definition: recovery_state_transfer.h:94
bool verify_after_gtids_applied()
Verifies if after_gtids sent by sender is successfully applied when recovery is using CHANNEL_UNTIL_A...
bool on_failover
Definition: recovery_state_transfer.h:451
void set_recovery_donor_retry_count(ulong retry_count)
Sets the number of times recovery tries to connect to a given donor.
Definition: recovery_state_transfer.h:89
bool recovery_get_public_key
Get public key.
Definition: recovery_state_transfer.h:469
int update_recovery_process(bool did_members_left)
This method decides what action to take when a member exits the group.
Definition: recovery_state_transfer.cc:262
void set_recovery_ssl_capath(const char *ssl_capath)
Set a folder with SSL trusted CA files.
Definition: recovery_state_transfer.h:141
~Recovery_state_transfer()
Definition: recovery_state_transfer.cc:89
Group_member_info_list * group_members
Definition: recovery_state_transfer.h:437
Group_member_info * selected_donor
Definition: recovery_state_transfer.h:433
mysql_cond_t recovery_condition
Definition: recovery_state_transfer.h:497
uint recovery_zstd_compression_level
Definition: recovery_state_transfer.h:507
State_transfer_status state_transfer(Plugin_stage_monitor_handler &stage_handler)
Execute state transfer.
Definition: recovery_state_transfer.cc:820
bool donor_channel_thread_error
Definition: recovery_state_transfer.h:453
long donor_reconnect_interval
Definition: recovery_state_transfer.h:503
void set_recovery_ssl_cipher(const char *ssl_cipher)
Set a SSL ciphers to be used.
Definition: recovery_state_transfer.h:151
Channel_observation_manager * channel_observation_manager
Definition: recovery_state_transfer.h:461
bool initialize_connection_parameters()
Initializes the connection parameters for the donor connection.
int establish_donor_connection()
Establish a master/slave connection to the selected donor.
Definition: recovery_state_transfer.cc:428
bool connected_to_donor
Definition: recovery_state_transfer.h:449
long max_connection_attempts_to_donors
Definition: recovery_state_transfer.h:501
Replication_thread_api donor_connection_interface
Interface class to interact with the donor connection threads.
Definition: recovery_state_transfer.h:458
State_transfer_status terminate_recovery_slave_threads(bool purge_logs=true)
Terminates the connection to the donor.
Definition: recovery_state_transfer.cc:772
char recovery_public_key_path[FN_REFLEN]
Public key information.
Definition: recovery_state_transfer.h:487
void set_recovery_tls_version(const char *tls_version)
Set a TLS versions to be used.
Definition: recovery_state_transfer.h:176
void set_recovery_ssl_ca(const char *ssl_ca)
Set a SSL trusted certificate authorities file.
Definition: recovery_state_transfer.h:136
void set_recovery_use_ssl(char use_ssl)
Set the option that forces the use of SSL on recovery connections.
Definition: recovery_state_transfer.h:133
int start_recovery_donor_threads()
Starts the recovery slave threads to receive data from the donor.
Definition: recovery_state_transfer.cc:618
char recovery_ssl_capath[FN_REFLEN]
The configured directory that contains trusted SSL CA files.
Definition: recovery_state_transfer.h:473
long donor_connection_retry_count
Definition: recovery_state_transfer.h:442
Recovery_state_transfer(char *recovery_channel_name, const std::string &member_uuid, Channel_observation_manager *channel_obsr_mngr)
Recovery state transfer constructor.
Definition: recovery_state_transfer.cc:44
void set_recovery_ssl_options(bool use_ssl, const char *ssl_ca, const char *ssl_capath, const char *ssl_cert, const char *ssl_cipher, const char *ssl_key, const char *ssl_crl, const char *ssl_crlpath, bool ssl_verify_server_cert, char *tls_version, char *tls_ciphersuites)
Sets all the SSL option to use on recovery.
Definition: recovery_state_transfer.h:113
char recovery_ssl_crl[FN_REFLEN]
The configured SSL file containing certificate revocation lists.
Definition: recovery_state_transfer.h:481
void donor_failover()
Method that sets the failover status to true and awakes recovery.
Definition: recovery_state_transfer.cc:343
int initialize_donor_connection(std::string hostname, uint port)
Initializes the structures for the donor connection threads.
Definition: recovery_state_transfer.cc:541
Channel_state_observer * recovery_channel_observer
Definition: recovery_state_transfer.h:464
void set_recovery_ssl_cert(const char *ssl_cert)
Set a SSL certificate for connection.
Definition: recovery_state_transfer.h:146
char recovery_ssl_cipher[FN_REFLEN]
The configured SSL list of permissible ciphers to use for encryption.
Definition: recovery_state_transfer.h:477
void set_recovery_tls_ciphersuites(const char *tls_ciphersuites)
Set a TLS ciphersuites to be used.
Definition: recovery_state_transfer.h:181
char recovery_ssl_crlpath[FN_REFLEN]
The configured directory that contains certificate revocation list files.
Definition: recovery_state_transfer.h:483
int check_recovery_thread_status()
Checks to see if the recovery IO/SQL thread is still running, probably caused by an timeout on shutdo...
Definition: recovery_state_transfer.cc:353
void inform_of_receiver_stop(my_thread_id thread_id)
Method that informs recovery that the donor channel receiver was stopped.
Definition: recovery_state_transfer.cc:190
bool is_own_event_channel(my_thread_id id)
Checks if the given id matches the recovery applier thread.
Definition: recovery_state_transfer.cc:364
bool verify_member_has_after_gtids_present(std::string &local_gtid_executed_string)
Verify member has after_gtids received from replication donor already present in member's gtid_execut...
Definition: recovery_state_transfer.cc:583
std::string m_recovery_channel_name
The recovery channel name.
Definition: recovery_state_transfer.h:415
void set_recovery_zstd_compression_level(uint level)
Set compression level.
Definition: recovery_state_transfer.h:236
std::string m_after_gtids
Definition: recovery_state_transfer.h:424
void end_state_transfer()
Signals that the data was received so the process can end.
Definition: recovery_state_transfer.cc:334
char recovery_ssl_key[FN_REFLEN]
The configured SSL key file to use for establishing a secure connection.
Definition: recovery_state_transfer.h:479
void initialize(const std::string &view_id, bool is_vcle_enabled)
Initialize the state transfer class and reset the class flags.
Definition: recovery_state_transfer.cc:106
void build_donor_list(std::string *selected_donor)
Based on the group list, build a random order list with all suitable donors.
Definition: recovery_state_transfer.cc:369
std::string member_uuid
Definition: recovery_state_transfer.h:418
char recovery_tls_version[FN_REFLEN]
Permitted TLS versions.
Definition: recovery_state_transfer.h:489
bool recovery_use_ssl
If the use of SSL is obligatory on recovery connections.
Definition: recovery_state_transfer.h:467
char recovery_ssl_ca[FN_REFLEN]
The configured SSL trusted certificate authorities file.
Definition: recovery_state_transfer.h:471
Group_member_info_list suitable_donors
Definition: recovery_state_transfer.h:439
void update_group_membership(bool update_donor)
Removes the old list of group members and enquires about the current members.
Definition: recovery_state_transfer.cc:224
bool recovery_aborted
Definition: recovery_state_transfer.h:445
void set_recovery_ssl_key(const char *ssl_key)
Set a SSL key for connections.
Definition: recovery_state_transfer.h:156
void set_recovery_ssl_crl(const char *ssl_crl)
Set a SSL revocation list file.
Definition: recovery_state_transfer.h:161
void set_recovery_get_public_key(bool set)
Get preference to get public key.
Definition: recovery_state_transfer.h:228
void initialize_group_info()
This method initializes the group membership info.
Definition: recovery_state_transfer.cc:212
bool get_recovery_use_ssl()
Definition: recovery_state_transfer.h:194
bool recovery_ssl_verify_server_cert
If the server's Common Name value checks against donor sent certificate.
Definition: recovery_state_transfer.h:485
std::string view_id
Definition: recovery_state_transfer.h:421
std::string selected_donor_hostname
Definition: recovery_state_transfer.h:435
void set_stop_wait_timeout(ulong timeout)
Sets the recovery shutdown timeout.
Definition: recovery_state_transfer.h:215
char recovery_compression_algorithm[COMPRESSION_ALGORITHM_NAME_LENGTH_MAX]
Definition: recovery_state_transfer.h:505
void set_recovery_public_key_path(const char *public_key_path)
Set a public key file.
Definition: recovery_state_transfer.h:220
mysql_mutex_t recovery_lock
Definition: recovery_state_transfer.h:495
bool donor_transfer_finished
Definition: recovery_state_transfer.h:447
void inform_of_applier_stop(my_thread_id thread_id, bool aborted)
Method that informs recovery that the donor channel applier was stopped.
Definition: recovery_state_transfer.cc:133
void set_recovery_ssl_crlpath(const char *ssl_crlpath)
Set a folder with SSL revocation list files.
Definition: recovery_state_transfer.h:166
void get_recovery_base_ssl_options(std::string *ssl_ca, std::string *ssl_cert, std::string *ssl_key)
Get SSL options configured for recovery.
Definition: recovery_state_transfer.h:203
void abort_state_transfer()
Abort the state transfer.
Definition: recovery_state_transfer.cc:252
void set_recovery_ssl_verify_server_cert(char ssl_verify_server_cert)
Set if recovery shall compare the used hostname against the certificate.
Definition: recovery_state_transfer.h:171
char recovery_ssl_cert[FN_REFLEN]
The configured SSL certificate file to use for a secure connection.
Definition: recovery_state_transfer.h:475
void set_until_condition_after_gtids(const std::string &after_gtids)
Set the gtids to use for the recovery until condition.
Definition: recovery_state_transfer.cc:128
void set_recovery_compression_algorithm(const char *name)
Set compression algorithm.
Definition: recovery_state_transfer.h:231
int purge_recovery_slave_threads_repos()
Purges relay logs and the master info object.
Definition: recovery_state_transfer.cc:794
mysql_mutex_t donor_selection_lock
Definition: recovery_state_transfer.h:498
enum_channel_until_condition m_until_condition
Definition: recovery_state_transfer.h:430
Definition: replication_threads_api.h:37
void set_stop_wait_timeout(ulong timeout)
Sets the threads shutdown timeout.
Definition: replication_threads_api.h:292
#define COMPRESSION_ALGORITHM_NAME_LENGTH_MAX
Definition: compression.h:40
std::vector< Group_member_info *, Malloc_allocator< Group_member_info * > > Group_member_info_list
Definition: member_info.h:771
Common #defines and includes for file and socket I/O.
#define FN_REFLEN
Definition: my_io.h:83
static my_thread_id thread_id
Definition: my_thr_init.cc:63
uint32 my_thread_id
Definition: my_thread_local.h:34
static bool timeout(bool(*wait_condition)())
Timeout function.
Definition: log0meb.cc:498
std::set< Key, Compare, ut::allocator< Key > > set
Specialization of set which uses ut_allocator.
Definition: ut0new.h:2884
static char recovery_channel_name[]
The relay log name.
Definition: recovery.cc:53
enum st_state_transfer_status State_transfer_status
st_state_transfer_status
Definition: recovery_state_transfer.h:38
@ STATE_TRANSFER_OK
Definition: recovery_state_transfer.h:39
@ STATE_TRANSFER_STOP
Definition: recovery_state_transfer.h:40
@ STATE_TRANSFER_PURGE
Definition: recovery_state_transfer.h:41
@ STATE_TRANSFER_NO_CONNECTION
Definition: recovery_state_transfer.h:42
required uint64 port
Definition: replication_asynchronous_connection_failover.proto:33
enum_channel_until_condition
The known until conditions that can be applied to channels.
Definition: rpl_channel_service_interface.h:134
case opt name
Definition: sslopt-case.h:29
An instrumented cond structure.
Definition: mysql_cond_bits.h:50
An instrumented mutex structure.
Definition: mysql_mutex_bits.h:50
int ssl_verify_server_cert(SSL *ssl, const char *server_hostname)