MySQL  8.0.19
Source Code Documentation
recovery_state_transfer.h
Go to the documentation of this file.
1 /* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
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 also distributed 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 included with MySQL.
13 
14  This program is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU General Public License, version 2.0, for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with this program; if not, write to the Free Software
21  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22 
23 #ifndef RECOVERY_STATE_TRANSFER_INCLUDE
24 #define RECOVERY_STATE_TRANSFER_INCLUDE
25 
27 #include <string>
28 #include <vector>
29 
30 #include "compression.h"
31 #include "my_io.h"
36 
38  public:
39  /**
40  Recovery state transfer constructor
41  @param recovery_channel_name The channel name to be used
42  @param member_uuid This member uuid
43  @param channel_obsr_mngr The channel state observer manager
44  */
46  const std::string &member_uuid,
47  Channel_observation_manager *channel_obsr_mngr);
48 
50 
51  // Base methods: init / abort / end
52 
53  /**
54  Initialize the state transfer class and reset the class flags
55 
56  @param rec_view_id The view id to use on this round
57  */
58  void initialize(const std::string &rec_view_id);
59 
60  /** Abort the state transfer */
61  void abort_state_transfer();
62 
63  /**
64  Signals that the data was received so the process can end.
65  */
66  void end_state_transfer();
67 
68  // Methods for variable updates
69 
70  /** Sets the number of times recovery tries to connect to a given donor */
73  }
74 
75  /** Sets the sleep time between connection attempts to all possible donors */
76  void set_recovery_donor_reconnect_interval(ulong reconnect_interval) {
77  donor_reconnect_interval = reconnect_interval;
78  }
79 
80  /**
81  Sets all the SSL option to use on recovery.
82 
83  @param use_ssl force the use of SSL on recovery connections
84  @param ssl_ca SSL trusted certificate authorities file
85  @param ssl_capath a directory with trusted CA files
86  @param ssl_cert the certificate file for secure connections
87  @param ssl_cipher the list of ciphers to use
88  @param ssl_key the SSL key file
89  @param ssl_crl SSL revocation list file
90  @param ssl_crlpath path with revocation list files
91  @param ssl_verify_server_cert verify the hostname against the certificate
92  @param tls_version the list of TLS versions to use
93  @param tls_ciphersuites the list of TLS ciphersuites to use
94  */
95  void set_recovery_ssl_options(bool use_ssl, const char *ssl_ca,
96  const char *ssl_capath, const char *ssl_cert,
97  const char *ssl_cipher, const char *ssl_key,
98  const char *ssl_crl, const char *ssl_crlpath,
99  bool ssl_verify_server_cert, char *tls_version,
100  char *tls_ciphersuites) {
101  recovery_use_ssl = use_ssl;
102  if (ssl_ca != NULL) set_recovery_ssl_ca(ssl_ca);
103  if (ssl_capath != NULL) set_recovery_ssl_capath(ssl_capath);
104  if (ssl_cert != NULL) set_recovery_ssl_cert(ssl_cert);
105  if (ssl_cipher != NULL) set_recovery_ssl_cipher(ssl_cipher);
106  if (ssl_key != NULL) set_recovery_ssl_key(ssl_key);
107  if (ssl_crl != NULL) set_recovery_ssl_crl(ssl_crl);
108  if (ssl_crlpath != NULL) set_recovery_ssl_crl(ssl_crlpath);
109  recovery_ssl_verify_server_cert = ssl_verify_server_cert;
110  if (tls_version != NULL) set_recovery_tls_version(tls_version);
111  set_recovery_tls_ciphersuites(tls_ciphersuites);
112  }
113 
114  /** Set the option that forces the use of SSL on recovery connections */
115  void set_recovery_use_ssl(char use_ssl) { this->recovery_use_ssl = use_ssl; }
116 
117  /** Set a SSL trusted certificate authorities file */
118  void set_recovery_ssl_ca(const char *ssl_ca) {
119  memcpy(recovery_ssl_ca, ssl_ca, strlen(ssl_ca) + 1);
120  }
121 
122  /** Set a folder with SSL trusted CA files */
123  void set_recovery_ssl_capath(const char *ssl_capath) {
124  memcpy(recovery_ssl_capath, ssl_capath, strlen(ssl_capath) + 1);
125  }
126 
127  /** Set a SSL certificate for connection */
128  void set_recovery_ssl_cert(const char *ssl_cert) {
129  memcpy(recovery_ssl_cert, ssl_cert, strlen(ssl_cert) + 1);
130  }
131 
132  /** Set a SSL ciphers to be used */
133  void set_recovery_ssl_cipher(const char *ssl_cipher) {
134  memcpy(recovery_ssl_cipher, ssl_cipher, strlen(ssl_cipher) + 1);
135  }
136 
137  /** Set a SSL key for connections */
138  void set_recovery_ssl_key(const char *ssl_key) {
139  memcpy(recovery_ssl_key, ssl_key, strlen(ssl_key) + 1);
140  }
141 
142  /** Set a SSL revocation list file*/
143  void set_recovery_ssl_crl(const char *ssl_crl) {
144  memcpy(recovery_ssl_crl, ssl_crl, strlen(ssl_crl) + 1);
145  }
146 
147  /** Set a folder with SSL revocation list files*/
148  void set_recovery_ssl_crlpath(const char *ssl_crlpath) {
149  memcpy(recovery_ssl_crlpath, ssl_crlpath, strlen(ssl_crlpath) + 1);
150  }
151 
152  /** Set if recovery shall compare the used hostname against the certificate */
153  void set_recovery_ssl_verify_server_cert(char ssl_verify_server_cert) {
154  this->recovery_ssl_verify_server_cert = ssl_verify_server_cert;
155  }
156 
157  /** Set a TLS versions to be used */
158  void set_recovery_tls_version(const char *tls_version) {
159  memcpy(recovery_tls_version, tls_version, strlen(tls_version) + 1);
160  }
161 
162  /** Set a TLS ciphersuites to be used */
163  void set_recovery_tls_ciphersuites(const char *tls_ciphersuites) {
164  if (nullptr == tls_ciphersuites) {
166  } else {
168  memcpy(recovery_tls_ciphersuites, tls_ciphersuites,
169  strlen(tls_ciphersuites) + 1);
170  }
171  }
172 
173  /**
174  @return Is recovery configured to use SSL
175  */
176  bool get_recovery_use_ssl() { return this->recovery_use_ssl; }
177 
178  /**
179  Get SSL options configured for recovery
180 
181  @param[out] ssl_ca the ssl ca
182  @param[out] ssl_cert the ssl cert
183  @param[out] ssl_key the ssl key
184  */
185  void get_recovery_base_ssl_options(std::string *ssl_ca, std::string *ssl_cert,
186  std::string *ssl_key) {
187  ssl_ca->assign(recovery_ssl_ca);
188  ssl_cert->assign(recovery_ssl_cert);
189  ssl_key->assign(recovery_ssl_key);
190  }
191 
192  /**
193  Sets the recovery shutdown timeout.
194 
195  @param[in] timeout the timeout
196  */
197  void set_stop_wait_timeout(ulong timeout) {
199  }
200 
201  /** Set a public key file*/
202  void set_recovery_public_key_path(const char *public_key_path) {
203  if (public_key_path != NULL) {
204  memcpy(recovery_public_key_path, public_key_path,
205  strlen(public_key_path) + 1);
206  }
207  }
208 
209  /** Get preference to get public key */
211 
212  /** Set compression algorithm */
214  memcpy(recovery_compression_algorithm, name, strlen(name) + 1);
215  }
216 
217  /** Set compression level */
220  }
221 
222  // Methods that update the state transfer process
223 
224  /** This method initializes the group membership info */
225  void initialize_group_info();
226 
227  /**
228  This method decides what action to take when a member exits the group.
229  If the donor left, and the state transfer is still ongoing, then pick a
230  new one and restart the transfer.
231 
232  @param did_members_left states if members left the view
233 
234  @return the operation status
235  @retval 0 OK
236  @retval !=0 Error
237  */
238  int update_recovery_process(bool did_members_left);
239 
240  /**
241  Method that informs recovery that the donor channel applier was stopped.
242 
243  @param thread_id the applier thread id
244  @param aborted if the applier was aborted or stopped
245  */
246  void inform_of_applier_stop(my_thread_id thread_id, bool aborted);
247 
248  /**
249  Method that informs recovery that the donor channel receiver was stopped.
250 
251  @param thread_id the applier thread id
252  */
254 
255  // Status methods
256 
257  /**
258  Checks if the given id matches the recovery applier thread
259  @param id the thread id
260 
261  @return if it belongs to a thread
262  @retval true the id matches a SQL or worker thread
263  @retval false the id doesn't match any thread
264  */
266 
267  /**
268  Checks to see if the recovery IO/SQL thread is still running, probably caused
269  by an timeout on shutdown.
270  If the threads are still running, we try to stop them again.
271  If not possible, an error is reported.
272 
273  @return are the threads stopped
274  @retval 0 All is stopped.
275  @retval !=0 Threads are still running
276  */
278 
279  // class core method
280 
281  /**
282  Execute state transfer
283  @param stage_handler Stage handler to update the system tables
284 
285  @return the operation status
286  @retval 0 OK
287  @retval !=0 Recovery state transfer failed
288  */
289  int state_transfer(Plugin_stage_monitor_handler &stage_handler);
290 
291  private:
292  /**
293  Removes the old list of group members and enquires about the current members
294 
295  @param[in] update_donor update the selected donor pointer when updating
296  */
297  void update_group_membership(bool update_donor);
298 
299  /**
300  Based on the group list, build a random order list with all suitable donors.
301 
302  @param selected_donor the current selected donor to update its pointer
303  */
304  void build_donor_list(std::string *selected_donor);
305 
306  /** Method that sets the failover status to true and awakes recovery */
307  void donor_failover();
308 
309  /**
310  Establish a master/slave connection to the selected donor.
311 
312  @return the operation status
313  @retval 0 OK
314  @retval !=0 Error
315  */
317 
318  /**
319  Initializes the structures for the donor connection threads.
320  Recovery channel is always purged.
321 
322  @return the operation status
323  @retval 0 OK
324  @retval !=0 Error
325  */
327 
328  /**
329  Initializes the connection parameters for the donor connection.
330 
331  @return
332  @retval false Everything OK
333  @retval true In case of the selected donor is not available
334  */
336 
337  /**
338  Starts the recovery slave threads to receive data from the donor.
339 
340  @return the operation status
341  @retval 0 OK
342  @retval !=0 Error
343  */
345 
346  /**
347  Terminates the connection to the donor
348 
349  @param purge_logs purge recovery logs
350 
351  @return the operation status
352  @retval 0 OK
353  @retval !=0 Error
354  */
355  int terminate_recovery_slave_threads(bool purge_logs = true);
356 
357  /**
358  Purges relay logs and the master info object
359 
360  @return the operation status
361  @retval 0 OK
362  @retval REPLICATION_THREAD_REPOSITORY_RL_PURGE_ERROR
363  Error when purging the relay logs
364  @retval REPLICATION_THREAD_REPOSITORY_MI_PURGE_ERROR
365  Error when cleaning the master info repository
366  */
368 
369  private:
370  /* The member uuid*/
371  std::string member_uuid;
372  /* The associated view id for the current recovery session */
373  std::string view_id;
374 
375  /* The selected donor member*/
377  /* The selected donor member hostname */
379  /* Vector with group members info*/
380  std::vector<Group_member_info *> *group_members;
381  /* Member with suitable donors for use on recovery*/
382  std::vector<Group_member_info *> suitable_donors;
383 
384  /* Retry count on donor connections*/
386 
387  /* Recovery abort flag */
389  /* Flag that signals when the donor transfered all it's data */
391  /* Are we successfully connected to a donor*/
393  /* Are we on failover mode*/
395  /* Did an error happened in one of the threads*/
397 
398  // Recovery connection related structures
399 
400  /** Interface class to interact with the donor connection threads*/
402 
403  /* The plugin's control module for channel status observation */
405 
406  /* The recovery channel state observer */
408 
409  /** If the use of SSL is obligatory on recovery connections */
411  /** Get public key */
413  /** The configured SSL trusted certificate authorities file */
415  /** The configured directory that contains trusted SSL CA files*/
417  /** The configured SSL certificate file to use for a secure connection*/
419  /** The configured SSL list of permissible ciphers to use for encryption.*/
421  /** The configured SSL key file to use for establishing a secure connection.*/
423  /** The configured SSL file containing certificate revocation lists*/
425  /** The configured directory that contains certificate revocation list files*/
427  /** If the server's Common Name value checks against donor sent certificate.*/
429  /** Public key information */
431  /** Permitted TLS versions. */
433  /** Permitted TLS 1.3 ciphersuites. */
436 
437  /* The lock for the recovery wait condition */
439  /* The condition for the recovery wait */
442 
443  /* Recovery max number of retries due to failures*/
445  /* Sleep time between connection attempts to all possible donors*/
447  /* compression algorithm to be used for communication */
449  /* compression level to be used for compression */
451 };
452 #endif /* RECOVERY_INCLUDE */
Recovery_state_transfer::recovery_ssl_verify_server_cert
bool recovery_ssl_verify_server_cert
If the server's Common Name value checks against donor sent certificate.
Definition: recovery_state_transfer.h:428
Recovery_state_transfer::set_recovery_ssl_cipher
void set_recovery_ssl_cipher(const char *ssl_cipher)
Set a SSL ciphers to be used.
Definition: recovery_state_transfer.h:133
Recovery_state_transfer::recovery_ssl_cipher
char recovery_ssl_cipher[FN_REFLEN]
The configured SSL list of permissible ciphers to use for encryption.
Definition: recovery_state_transfer.h:420
Recovery_state_transfer::recovery_tls_ciphersuites
char recovery_tls_ciphersuites[FN_REFLEN]
Definition: recovery_state_transfer.h:435
compression.h
Recovery_state_transfer::recovery_channel_observer
Channel_state_observer * recovery_channel_observer
Definition: recovery_state_transfer.h:407
Recovery_state_transfer::set_recovery_ssl_options
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:95
recovery_channel_name
static char recovery_channel_name[]
The relay log name.
Definition: recovery.cc:44
Recovery_state_transfer::recovery_ssl_crlpath
char recovery_ssl_crlpath[FN_REFLEN]
The configured directory that contains certificate revocation list files.
Definition: recovery_state_transfer.h:426
Recovery_state_transfer::recovery_aborted
bool recovery_aborted
Definition: recovery_state_transfer.h:388
Recovery_state_transfer::donor_connection_retry_count
long donor_connection_retry_count
Definition: recovery_state_transfer.h:385
Recovery_state_transfer::donor_connection_interface
Replication_thread_api donor_connection_interface
Interface class to interact with the donor connection threads.
Definition: recovery_state_transfer.h:401
NULL
#define NULL
Definition: types.h:55
thread_id
static my_thread_id thread_id
Definition: my_thr_init.cc:62
Recovery_state_transfer::set_recovery_ssl_ca
void set_recovery_ssl_ca(const char *ssl_ca)
Set a SSL trusted certificate authorities file.
Definition: recovery_state_transfer.h:118
Recovery_state_transfer::donor_failover
void donor_failover()
Method that sets the failover status to true and awakes recovery.
Definition: recovery_state_transfer.cc:294
Recovery_state_transfer::get_recovery_use_ssl
bool get_recovery_use_ssl()
Definition: recovery_state_transfer.h:176
Recovery_state_transfer::update_recovery_process
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:211
Recovery_state_transfer::recovery_ssl_key
char recovery_ssl_key[FN_REFLEN]
The configured SSL key file to use for establishing a secure connection.
Definition: recovery_state_transfer.h:422
Recovery_state_transfer::set_recovery_ssl_crl
void set_recovery_ssl_crl(const char *ssl_crl)
Set a SSL revocation list file.
Definition: recovery_state_transfer.h:143
Recovery_state_transfer
Definition: recovery_state_transfer.h:37
Group_member_info
Definition: member_info.h:78
Channel_observation_manager
A class to register observers for channel state events.
Definition: channel_observation_manager.h:130
COMPRESSION_ALGORITHM_NAME_LENGTH_MAX
#define COMPRESSION_ALGORITHM_NAME_LENGTH_MAX
Definition: compression.h:39
Recovery_state_transfer::terminate_recovery_slave_threads
int terminate_recovery_slave_threads(bool purge_logs=true)
Terminates the connection to the donor.
Definition: recovery_state_transfer.cc:580
Recovery_state_transfer::abort_state_transfer
void abort_state_transfer()
Abort the state transfer.
Definition: recovery_state_transfer.cc:201
stage_monitor_handler.h
mysql_mutex_t
An instrumented mutex structure.
Definition: mysql_mutex_bits.h:49
Recovery_state_transfer::group_members
std::vector< Group_member_info * > * group_members
Definition: recovery_state_transfer.h:380
Recovery_state_transfer::check_recovery_thread_status
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:304
Recovery_state_transfer::purge_recovery_slave_threads_repos
int purge_recovery_slave_threads_repos()
Purges relay logs and the master info object.
Definition: recovery_state_transfer.cc:601
Recovery_state_transfer::recovery_tls_version
char recovery_tls_version[FN_REFLEN]
Permitted TLS versions.
Definition: recovery_state_transfer.h:432
Recovery_state_transfer::set_recovery_ssl_verify_server_cert
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:153
Replication_thread_api::set_stop_wait_timeout
void set_stop_wait_timeout(ulong timeout)
Sets the threads shutdown timeout.
Definition: replication_threads_api.h:286
Recovery_state_transfer::selected_donor
Group_member_info * selected_donor
Definition: recovery_state_transfer.h:376
Recovery_state_transfer::end_state_transfer
void end_state_transfer()
Signals that the data was received so the process can end.
Definition: recovery_state_transfer.cc:285
Replication_thread_api
Definition: replication_threads_api.h:36
Recovery_state_transfer::connected_to_donor
bool connected_to_donor
Definition: recovery_state_transfer.h:392
Recovery_state_transfer::set_recovery_get_public_key
void set_recovery_get_public_key(bool set)
Get preference to get public key.
Definition: recovery_state_transfer.h:210
Recovery_state_transfer::recovery_get_public_key
bool recovery_get_public_key
Get public key.
Definition: recovery_state_transfer.h:412
Recovery_state_transfer::initialize_group_info
void initialize_group_info()
This method initializes the group membership info.
Definition: recovery_state_transfer.cc:161
Plugin_stage_monitor_handler
Definition: stage_monitor_handler.h:29
FN_REFLEN
#define FN_REFLEN
Definition: my_io.h:82
Recovery_state_transfer::set_recovery_tls_ciphersuites
void set_recovery_tls_ciphersuites(const char *tls_ciphersuites)
Set a TLS ciphersuites to be used.
Definition: recovery_state_transfer.h:163
Channel_state_observer
A interface class to code channel state response methods.
Definition: channel_observation_manager.h:37
Recovery_state_transfer::recovery_condition
mysql_cond_t recovery_condition
Definition: recovery_state_transfer.h:440
Recovery_state_transfer::set_recovery_donor_retry_count
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:71
Recovery_state_transfer::view_id
std::string view_id
Definition: recovery_state_transfer.h:373
Recovery_state_transfer::is_own_event_channel
bool is_own_event_channel(my_thread_id id)
Checks if the given id matches the recovery applier thread.
Definition: recovery_state_transfer.cc:315
Recovery_state_transfer::donor_reconnect_interval
long donor_reconnect_interval
Definition: recovery_state_transfer.h:446
Recovery_state_transfer::establish_donor_connection
int establish_donor_connection()
Establish a master/slave connection to the selected donor.
Definition: recovery_state_transfer.cc:367
Recovery_state_transfer::channel_observation_manager
Channel_observation_manager * channel_observation_manager
Definition: recovery_state_transfer.h:404
Recovery_state_transfer::recovery_ssl_ca
char recovery_ssl_ca[FN_REFLEN]
The configured SSL trusted certificate authorities file.
Definition: recovery_state_transfer.h:414
Recovery_state_transfer::recovery_lock
mysql_mutex_t recovery_lock
Definition: recovery_state_transfer.h:438
Recovery_state_transfer::inform_of_applier_stop
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:113
uint
unsigned int uint
Definition: uca-dump.cc:29
Recovery_state_transfer::suitable_donors
std::vector< Group_member_info * > suitable_donors
Definition: recovery_state_transfer.h:382
Recovery_state_transfer::selected_donor_hostname
std::string selected_donor_hostname
Definition: recovery_state_transfer.h:378
Recovery_state_transfer::recovery_ssl_capath
char recovery_ssl_capath[FN_REFLEN]
The configured directory that contains trusted SSL CA files.
Definition: recovery_state_transfer.h:416
Recovery_state_transfer::set_recovery_ssl_crlpath
void set_recovery_ssl_crlpath(const char *ssl_crlpath)
Set a folder with SSL revocation list files.
Definition: recovery_state_transfer.h:148
Recovery_state_transfer::donor_channel_thread_error
bool donor_channel_thread_error
Definition: recovery_state_transfer.h:396
Recovery_state_transfer::set_recovery_compression_algorithm
void set_recovery_compression_algorithm(const char *name)
Set compression algorithm.
Definition: recovery_state_transfer.h:213
Recovery_state_transfer::update_group_membership
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:172
Recovery_state_transfer::recovery_use_ssl
bool recovery_use_ssl
If the use of SSL is obligatory on recovery connections.
Definition: recovery_state_transfer.h:410
Recovery_state_transfer::set_recovery_ssl_capath
void set_recovery_ssl_capath(const char *ssl_capath)
Set a folder with SSL trusted CA files.
Definition: recovery_state_transfer.h:123
Recovery_state_transfer::recovery_zstd_compression_level
uint recovery_zstd_compression_level
Definition: recovery_state_transfer.h:450
Recovery_state_transfer::on_failover
bool on_failover
Definition: recovery_state_transfer.h:394
Recovery_state_transfer::recovery_ssl_crl
char recovery_ssl_crl[FN_REFLEN]
The configured SSL file containing certificate revocation lists.
Definition: recovery_state_transfer.h:424
Recovery_state_transfer::set_recovery_ssl_cert
void set_recovery_ssl_cert(const char *ssl_cert)
Set a SSL certificate for connection.
Definition: recovery_state_transfer.h:128
Recovery_state_transfer::start_recovery_donor_threads
int start_recovery_donor_threads()
Starts the recovery slave threads to receive data from the donor.
Definition: recovery_state_transfer.cc:505
Recovery_state_transfer::donor_transfer_finished
bool donor_transfer_finished
Definition: recovery_state_transfer.h:390
Recovery_state_transfer::set_recovery_ssl_key
void set_recovery_ssl_key(const char *ssl_key)
Set a SSL key for connections.
Definition: recovery_state_transfer.h:138
name
const string name("\"Name\"")
Recovery_state_transfer::max_connection_attempts_to_donors
long max_connection_attempts_to_donors
Definition: recovery_state_transfer.h:444
Recovery_state_transfer::set_recovery_zstd_compression_level
void set_recovery_zstd_compression_level(uint level)
Set compression level.
Definition: recovery_state_transfer.h:218
set
void set(ENGINE_HANDLE *h, ENGINE_HANDLE_V1 *h1)
Definition: suite_stubs.c:105
my_thread_id
uint32 my_thread_id
Definition: my_thread_local.h:33
Recovery_state_transfer::recovery_tls_ciphersuites_null
bool recovery_tls_ciphersuites_null
Permitted TLS 1.3 ciphersuites.
Definition: recovery_state_transfer.h:434
Recovery_state_transfer::state_transfer
int state_transfer(Plugin_stage_monitor_handler &stage_handler)
Execute state transfer.
Definition: recovery_state_transfer.cc:619
Recovery_state_transfer::recovery_public_key_path
char recovery_public_key_path[FN_REFLEN]
Public key information.
Definition: recovery_state_transfer.h:430
Recovery_state_transfer::get_recovery_base_ssl_options
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:185
Recovery_state_transfer::set_recovery_use_ssl
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:115
Recovery_state_transfer::build_donor_list
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:320
Recovery_state_transfer::recovery_compression_algorithm
char recovery_compression_algorithm[COMPRESSION_ALGORITHM_NAME_LENGTH_MAX]
Definition: recovery_state_transfer.h:448
ulong
unsigned long ulong
Definition: my_inttypes.h:48
Recovery_state_transfer::Recovery_state_transfer
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:38
Recovery_state_transfer::initialize_donor_connection
int initialize_donor_connection()
Initializes the structures for the donor connection threads.
Definition: recovery_state_transfer.cc:464
member_info.h
Recovery_state_transfer::set_recovery_public_key_path
void set_recovery_public_key_path(const char *public_key_path)
Set a public key file.
Definition: recovery_state_transfer.h:202
mysql_cond_t
An instrumented cond structure.
Definition: mysql_cond_bits.h:49
Recovery_state_transfer::initialize
void initialize(const std::string &rec_view_id)
Initialize the state transfer class and reset the class flags.
Definition: recovery_state_transfer.cc:95
my_io.h
Recovery_state_transfer::set_stop_wait_timeout
void set_stop_wait_timeout(ulong timeout)
Sets the recovery shutdown timeout.
Definition: recovery_state_transfer.h:197
Recovery_state_transfer::set_recovery_donor_reconnect_interval
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:76
Recovery_state_transfer::inform_of_receiver_stop
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:139
Recovery_state_transfer::initialize_connection_parameters
bool initialize_connection_parameters()
Initializes the connection parameters for the donor connection.
Recovery_state_transfer::~Recovery_state_transfer
~Recovery_state_transfer()
Definition: recovery_state_transfer.cc:79
Recovery_state_transfer::donor_selection_lock
mysql_mutex_t donor_selection_lock
Definition: recovery_state_transfer.h:441
Recovery_state_transfer::recovery_ssl_cert
char recovery_ssl_cert[FN_REFLEN]
The configured SSL certificate file to use for a secure connection.
Definition: recovery_state_transfer.h:418
Recovery_state_transfer::member_uuid
std::string member_uuid
Definition: recovery_state_transfer.h:371
group_replication_priv.h
replication_threads_api.h
Recovery_state_transfer::set_recovery_tls_version
void set_recovery_tls_version(const char *tls_version)
Set a TLS versions to be used.
Definition: recovery_state_transfer.h:158
channel_observation_manager.h