24#ifndef RECOVERY_INCLUDE
25#define RECOVERY_INCLUDE
80 const std::string &rec_view_id);
164 const char *ssl_capath,
const char *ssl_cert,
165 const char *ssl_cipher,
const char *ssl_key,
166 const char *ssl_crl,
const char *ssl_crlpath,
168 char *tls_ciphersuites) {
171 if (ssl_capath !=
nullptr)
173 if (ssl_cert !=
nullptr)
175 if (ssl_cipher !=
nullptr)
177 if (ssl_key !=
nullptr)
179 if (ssl_crl !=
nullptr)
181 if (ssl_crlpath !=
nullptr)
185 if (tls_version !=
nullptr)
261 std::string *ssl_key) {
286 if (public_key_path !=
nullptr)
Definition: applier.h:240
A class to register observers for channel state events.
Definition: channel_observation_manager.h:131
Definition: recovery.h:45
void set_recovery_ssl_crlpath(const char *ssl_crlpath)
Set a folder with SSL revocation list files.
Definition: recovery.h:226
void set_recovery_get_public_key(bool set)
Get public key automatically.
Definition: recovery.h:291
mysql_cond_t run_cond
Definition: recovery.h:375
void set_recovery_thread_context()
Sets the thread context.
Definition: recovery.cc:450
void set_recovery_ssl_cipher(const char *ssl_cipher)
Set a SSL ciphers to be used.
Definition: recovery.h:211
int start_recovery(const std::string &group_name, const std::string &rec_view_id)
Starts the recovery process, initializing the recovery thread.
Definition: recovery.cc:71
std::string group_name
Definition: recovery.h:363
thread_state recovery_thd_state
Definition: recovery.h:369
void notify_group_recovery_end()
Sends a message throughout the group stating the member as online.
Definition: recovery.cc:571
bool is_own_event_channel(my_thread_id id)
Checks if the given id matches the recovery applier thread.
Definition: recovery.cc:583
void set_recovery_donor_retry_count(ulong retry_count)
Sets the number of times recovery tries to connect to a given donor.
Definition: recovery.h:138
int set_retrieved_cert_info(void *info)
Set retrieved certification info from a group replication channel extracted from a given View_change ...
Definition: recovery.cc:425
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.h:231
void set_recovery_ssl_capath(const char *ssl_capath)
Set a folder with SSL trusted CA files.
Definition: recovery.h:201
void clean_recovery_thread_context()
Cleans the recovery thread related options/structures.
Definition: recovery.cc:464
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.h:163
void set_stop_wait_timeout(ulong timeout)
Sets the recovery shutdown timeout.
Definition: recovery.h:270
void set_recovery_public_key_path(const char *public_key_path)
Set a public key file.
Definition: recovery.h:285
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.cc:588
void set_recovery_ssl_key(const char *ssl_key)
Set a SSL key for connections.
Definition: recovery.h:216
void set_recovery_tls_ciphersuites(const char *tls_ciphersuites)
Set TLS ciphersuites to be used.
Definition: recovery.h:242
void set_applier_module(Applier_module_interface *applier)
Definition: recovery.h:60
void set_recovery_use_ssl(char use_ssl)
Set the option that forces the use of SSL on recovery connections.
Definition: recovery.h:191
void set_recovery_donor_reconnect_interval(ulong reconnect_interval)
Sets the sleep time between connection attempts to all possible donors.
Definition: recovery.h:143
Applier_module_interface * applier_module
Definition: recovery.h:360
void leave_group_on_recovery_failure()
Handles code for removing the member in case of a failure during recovery.
Definition: recovery.cc:158
my_thread_handle recovery_pthd
Definition: recovery.h:356
~Recovery_module()
Definition: recovery.cc:66
void set_recovery_ssl_cert(const char *ssl_cert)
Set a SSL certificate for connection.
Definition: recovery.h:206
Recovery_state_transfer recovery_state_transfer
Definition: recovery.h:366
THD * recovery_thd
Definition: recovery.h:357
int stop_recovery(bool wait_for_termination=true)
Stops the recovery process, shutting down the recovery thread.
Definition: recovery.cc:105
bool get_recovery_use_ssl()
Definition: recovery.h:249
void set_recovery_tls_version(const char *tls_version)
Set TLS version to be used.
Definition: recovery.h:237
Recovery_module(Applier_module_interface *applier, Channel_observation_manager *channel_obsr_mngr)
Recovery_module constructor.
Definition: recovery.cc:53
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.h:260
void set_recovery_compression_algorithm(const char *name)
Set compression algorithm.
Definition: recovery.h:296
void set_recovery_completion_policy(enum_recovery_completion_policies completion_policy)
Sets recovery threshold policy on what to wait when handling transactions.
Definition: recovery.h:279
int wait_for_applier_module_recovery()
Starts a wait process until the applier fulfills the necessary condition for the member to be acknowl...
Definition: recovery.cc:469
int update_recovery_process(bool did_members_left, bool is_leaving)
This method decides what action to take when a member exits the group and executes it.
Definition: recovery.cc:401
mysql_mutex_t run_lock
Definition: recovery.h:374
State_transfer_status m_state_transfer_return
Definition: recovery.h:381
void set_recovery_zstd_compression_level(uint level)
Set compression level.
Definition: recovery.h:301
void set_recovery_ssl_ca(const char *ssl_ca)
Set a SSL trusted certificate authorities file.
Definition: recovery.h:196
void set_recovery_ssl_crl(const char *ssl_crl)
Set a SSL revocation list file.
Definition: recovery.h:221
int recovery_thread_handle()
Recovery thread main execution method.
Definition: recovery.cc:211
bool recovery_aborted
Definition: recovery.h:371
enum_recovery_completion_policies recovery_completion_policy
Definition: recovery.h:378
Definition: recovery_state_transfer.h:45
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:84
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:79
void set_recovery_ssl_capath(const char *ssl_capath)
Set a folder with SSL trusted CA files.
Definition: recovery_state_transfer.h:131
void set_recovery_ssl_cipher(const char *ssl_cipher)
Set a SSL ciphers to be used.
Definition: recovery_state_transfer.h:141
void set_recovery_tls_version(const char *tls_version)
Set a TLS versions to be used.
Definition: recovery_state_transfer.h:166
void set_recovery_ssl_ca(const char *ssl_ca)
Set a SSL trusted certificate authorities file.
Definition: recovery_state_transfer.h:126
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:123
void set_recovery_ssl_cert(const char *ssl_cert)
Set a SSL certificate for connection.
Definition: recovery_state_transfer.h:136
void set_recovery_tls_ciphersuites(const char *tls_ciphersuites)
Set a TLS ciphersuites to be used.
Definition: recovery_state_transfer.h:171
void set_recovery_zstd_compression_level(uint level)
Set compression level.
Definition: recovery_state_transfer.h:226
void set_recovery_ssl_key(const char *ssl_key)
Set a SSL key for connections.
Definition: recovery_state_transfer.h:146
void set_recovery_ssl_crl(const char *ssl_crl)
Set a SSL revocation list file.
Definition: recovery_state_transfer.h:151
void set_recovery_get_public_key(bool set)
Get preference to get public key.
Definition: recovery_state_transfer.h:218
bool get_recovery_use_ssl()
Definition: recovery_state_transfer.h:184
void set_stop_wait_timeout(ulong timeout)
Sets the recovery shutdown timeout.
Definition: recovery_state_transfer.h:205
void set_recovery_public_key_path(const char *public_key_path)
Set a public key file.
Definition: recovery_state_transfer.h:210
void set_recovery_ssl_crlpath(const char *ssl_crlpath)
Set a folder with SSL revocation list files.
Definition: recovery_state_transfer.h:156
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:193
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:161
void set_recovery_compression_algorithm(const char *name)
Set compression algorithm.
Definition: recovery_state_transfer.h:221
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:34
uint32 my_thread_id
Definition: my_thread_local.h:34
static bool timeout(bool(*wait_condition)())
Timeout function.
Definition: log0meb.cc:496
std::set< Key, Compare, ut::allocator< Key > > set
Specialization of set which uses ut_allocator.
Definition: ut0new.h:2883
enum_recovery_completion_policies
Definition: recovery.h:39
@ RECOVERY_POLICY_WAIT_CERTIFIED
Definition: recovery.h:40
@ RECOVERY_POLICY_WAIT_EXECUTED
Definition: recovery.h:42
enum st_state_transfer_status State_transfer_status
case opt name
Definition: sslopt-case.h:33
Definition: my_thread_bits.h:52
An instrumented cond structure.
Definition: mysql_cond_bits.h:50
An instrumented mutex structure.
Definition: mysql_mutex_bits.h:50
Definition: plugin_utils.h:47
unsigned int uint
Definition: uca9-dump.cc:75
int ssl_verify_server_cert(SSL *ssl, const char *server_hostname)