MySQL 8.0.39
Source Code Documentation
rpl_channel_service_interface.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 RPL_SERVICE_INTERFACE_INCLUDE
25#define RPL_SERVICE_INTERFACE_INCLUDE
26
27#include <string>
28#include <vector>
29
30// Channel errors
31
32#define RPL_CHANNEL_SERVICE_RECEIVER_CONNECTION_ERROR -1
33#define RPL_CHANNEL_SERVICE_DEFAULT_CHANNEL_CREATION_ERROR -2
34#define RPL_CHANNEL_SERVICE_SLAVE_SKIP_COUNTER_ACTIVE -3
35#define RPL_CHANNEL_SERVICE_CHANNEL_DOES_NOT_EXISTS_ERROR -4
36// Error for the wait event consumption, equal to the server wait for GTID
37// method
38#define REPLICATION_THREAD_WAIT_TIMEOUT_ERROR -1
39#define REPLICATION_THREAD_WAIT_NO_INFO_ERROR -2
40
41// Settings
42
43// Used whenever a parameter should take the server default value
44#define RPL_SERVICE_SERVER_DEFAULT -1
45
46// Channel creation settings
47
48/**
49 Types of channels
50*/
52 SLAVE_REPLICATION_CHANNEL, // Master slave replication channels
53 GROUP_REPLICATION_CHANNEL // Group replication channels
54};
55
56/**
57 Know parallelization options that can be applied to channel appliers
58*/
62};
63
64/**
65 SSL information to be used when creating a channel.
66 It maps the SSL options present in a CHANGE MASTER.
67*/
69 int use_ssl; // use SSL
70 char *ssl_ca_file_name; // SSL list of trusted certificate authorities
71 char *ssl_ca_directory; // SSL certificate authorities directory
72 char *ssl_cert_file_name; // SSL connection certificate
73 char *ssl_crl_file_name; // SSL certificate revocation list
74 char *ssl_crl_directory; // SSL certificate revocation list file directory
75 char *ssl_key; // SSL key file for connections
76 char *ssl_cipher; // list of permissible ciphers to use for SSL
77 int ssl_verify_server_cert; // check the server's Common Name value
78 char *tls_version; // TLS version to use for SSL
79 char *tls_ciphersuites; // list of permissible ciphersuites for TLS 1.3
80};
81
82void initialize_channel_ssl_info(Channel_ssl_info *channel_ssl_info);
83
84/**
85 Creation information for a channel.
86 It includes the data that is usually associated to a change master command
87*/
90 char *hostname;
91 int port;
92 char *user;
93 char *password;
100 int thd_tx_priority; // The applier thread priority
102 int connect_retry; // How many seconds to wait between retries.
103 int retry_count; // Limits the number of reconnection attempts
104 bool preserve_relay_logs; // If the logs should be preserved on creation
105 char *public_key_path; // RSA Public key information
106 int get_public_key; // Preference to get public key from donor if not
107 // available
110 /* to enable async connection failover */
114};
115
117
118// Start settings
119
120/**
121 The known types of channel threads.
122 All new types should be power of 2
123*/
129
130/**
131 The known until conditions that can be applied to channels
132*/
140
141/**
142 Channel information to connect to a receiver
143*/
145 int until_condition; // base on enum_channel_until_condition
146 char *gtid; // Gtids to wait on a until condition
147 char *view_id; // The view id to wait on a until condition
148};
149
151
152/**
153 Initializes a channel connection in a similar way to a change master command.
154
155 @note If the channel exists, it is reconfigured with the new options.
156 About the logs, the preserve_relay_logs option allows the user to
157 maintain them untouched.
158
159 @param channel The channel name
160 @param channel_information Channel creation information.
161
162 @return the operation status
163 @retval 0 OK
164 @retval !=0 Error on channel creation
165*/
166int channel_create(const char *channel,
167 Channel_creation_info *channel_information);
168
169/**
170 Start the Applier/Receiver threads according to the given options.
171 If the receiver thread is to be started, connection credential must be
172 supported.
173
174 @param channel The channel name
175 @param connection_info Channel connection information
176 @param threads_to_start The types of threads to be started
177 @param wait_for_connection If when starting the receiver, the method should
178 wait for the connection to succeed
179 @param use_server_mta_configuration
180 If true, the channel uses the server parallel
181 applier configuration when starting the applier
182 thread, instead of the configuration given on
183 `channel_create()`
184 @param channel_map_already_locked
185 If set to true, will not acquire a write
186 lock of channel_map
187
188 @return the operation status
189 @retval 0 OK
190 @retval !=0 Error
191 */
192int channel_start(const char *channel, Channel_connection_info *connection_info,
193 int threads_to_start, int wait_for_connection,
194 bool use_server_mta_configuration = false,
195 bool channel_map_already_locked = false);
196
197/**
198 Stops the channel threads according to the given options.
199
200 @param channel The channel name
201 @param threads_to_stop The types of threads to be stopped
202 @param timeout The expected time in which the thread should stop
203 @return the operation status
204 @retval 0 OK
205 @retval !=0 Error
206*/
207int channel_stop(const char *channel, int threads_to_stop, long timeout);
208
209/**
210 Kills the Binlog Dump threads.
211
212 @return the operation status
213 @retval 0 OK
214*/
216
217/**
218 Stops all the running channel threads according to the given options.
219
220 @param threads_to_stop The types of threads to be stopped
221 @param timeout The expected time in which the thread should stop
222 @param error_message The returned error_message
223
224 @return the operation status
225 @retval 0 OK
226 @retval !=0 Error
227*/
229 std::string *error_message);
230/**
231 Purges the channel logs
232
233 @param channel The channel name
234 @param reset_all If true, the method will purge logs and remove the channel
235 If false, only the channel information will be reset.
236
237 @return the operation status
238 @retval 0 OK
239 @retval !=0 Error
240*/
241int channel_purge_queue(const char *channel, bool reset_all);
242
243/**
244 Tells if the selected component of the channel is active or not.
245 If no component is passed, this method returns if the channel exists or not
246
247 @param channel The channel name
248 @param type The thread that should be checked.
249 If 0, this method applies to the channel existence.
250
251 @return is the channel (component) active
252 @retval true Yes
253 @retval false No
254*/
256
257/**
258 Returns the id(s) of the channel threads: receiver or applier.
259 If more than one applier exists, an array is returned, on which first
260 index is coordinator thread id.
261
262 @param[in] channel The channel name
263 @param[in] thread_type The thread type (receiver or applier)
264 @param[out] thread_id The array of id(s)
265 @param[in] need_lock Is channel_map read lock needed?
266
267 @return the number of returned ids
268 @retval -1 the channel does no exists, or the thread is not present
269 @retval >0 the number of thread ids returned.
270*/
271int channel_get_thread_id(const char *channel,
272 enum_channel_thread_types thread_type,
273 unsigned long **thread_id, bool need_lock = true);
274
275/**
276 Returns last GNO from applier from a given UUID.
277
278 @param channel the channel name
279 @param sidno the uuid associated to the desired gno
280
281 @return the last applier gno
282 @retval <0 the channel does no exists, or the applier is not present
283 @retval >0 the gno
284*/
285long long channel_get_last_delivered_gno(const char *channel, int sidno);
286
287/**
288 Adds server executed GTID set to channel received GTID set.
289
290 @param channel the channel name
291
292 @return the operation status
293 @retval 0 OK
294 @retval != 0 Error
295*/
297
298/**
299 Queues a event packet into the current active channel.
300
301 @param channel the channel name
302 @param buf the event buffer
303 @param len the event buffer length
304
305 @return the operation status
306 @retval 0 OK
307 @retval != 0 Error on queue
308*/
309int channel_queue_packet(const char *channel, const char *buf,
310 unsigned long len);
311
312/**
313 Checks if all the queued transactions were executed.
314
315 @note This method assumes that the channel is not receiving any more events.
316 If it is still receiving, then the method should wait for execution of
317 transactions that were present when this method was invoked.
318
319 @param channel the channel name
320 @param timeout the time (seconds) after which the method returns if the
321 above condition was not satisfied
322
323 @return the operation status
324 @retval 0 All transactions were executed
325 @retval REPLICATION_THREAD_WAIT_TIMEOUT_ERROR A timeout occurred
326 @retval REPLICATION_THREAD_WAIT_NO_INFO_ERROR An error occurred
327*/
329
330/**
331 Checks if all the transactions in the given set were executed.
332
333 @param channel the channel name
334 @param gtid_set the set in string format of transaction to wait for
335 @param timeout the time (seconds) after which the method returns if the
336 above condition was not satisfied
337 @param update_THD_status Shall the method update the THD stage
338
339 @return the operation status
340 @retval 0 All transactions were executed
341 @retval REPLICATION_THREAD_WAIT_TIMEOUT_ERROR A timeout occurred
342 @retval REPLICATION_THREAD_WAIT_NO_INFO_ERROR An error occurred
343*/
345 const char *gtid_set,
346 double timeout,
347 bool update_THD_status = true);
348
349/**
350 Checks if the applier, and its workers when parallel applier is
351 enabled, has already consumed all relay log, that is, applier is
352 waiting for transactions to be queued.
353
354 @param channel The channel name
355
356 @return the operation status
357 @retval <0 Error
358 @retval 0 Applier is not waiting
359 @retval 1 Applier is waiting
360*/
361int channel_is_applier_waiting(const char *channel);
362
363/**
364 Checks if the applier thread, and its workers when parallel applier is
365 enabled, has already consumed all relay log, that is, applier thread
366 is waiting for transactions to be queued.
367
368 @param thread_id the applier thread id to check
369 @param worker flag to indicate if thread is a parallel worker
370
371 @return the operation status
372 @retval -1 Unable to find applier thread
373 @retval 0 Applier thread is not waiting
374 @retval 1 Applier thread is waiting
375*/
377 bool worker = false);
378
379/**
380 Flush the channel.
381
382 @return the operation status
383 @retval 0 OK
384 @retval != 0 Error on flush
385*/
386int channel_flush(const char *channel);
387
388/**
389 Initializes channel structures if needed.
390
391 @return the operation status
392 @retval 0 OK
393 @retval != 0 Error on queue
394*/
396
397/**
398 Returns the receiver thread retrieved GTID set in string format.
399
400 @param channel The channel name.
401 @param[out] retrieved_set Pointer to pointer to string. The function will
402 set it to point to a newly allocated buffer, or
403 NULL on out of memory.
404
405 @return the operation status
406 @retval 0 OK
407 @retval !=0 Error on retrieval
408*/
409int channel_get_retrieved_gtid_set(const char *channel, char **retrieved_set);
410
411/**
412 Tells if the selected component of the channel is stopping or not.
413
414 @param channel The channel name
415 @param type The thread that should be checked.
416
417 @return is the channel (component) stopping
418 @retval true Yes
419 @retval false No, no type was specified or the channel does not exist.
420*/
422
423/**
424 Checks if the given channel's relaylog contains a partial transaction.
425
426 @param channel The channel name
427
428 @retval true If relaylog contains partial transcation.
429 @retval false If relaylog does not contain partial transaction.
430*/
432
433/**
434 Checks if any slave threads of any channel is running
435
436 @param[in] thread_mask type of slave thread- IO/SQL or any
437
438 @retval true at least one channel thread is running.
439 @retval false none of the the channels are running.
440*/
441bool is_any_slave_channel_running(int thread_mask);
442
443/**
444 Checks if any slave threads of any channel configured with
445 SOURCE_CONNECTION_AUTO_FAILOVER is running.
446
447 @param[in] thread_mask type of slave thread- IO/SQL or any
448
449 @retval true at least one channel threads are running.
450 @retval false none of the the channels are running.
451*/
453
454/**
455 Checks if any running channel uses the same UUID for
456 assign_gtids_to_anonymous_transactions as the group_name
457
458 @param[in] group_name the group name
459
460 @retval true at least one channel has the same uuid
461 @retval false none of the the channels have the same
462 uuid
463*/
464bool channel_has_same_uuid_as_group_name(const char *group_name);
465
466/**
467 Method to get the credentials configured for a channel
468
469 @param[in] channel The channel name
470 @param[out] user The user to extract
471 @param[out] password The password to extract
472
473 @return the operation status
474 @retval false OK
475 @retval true Error, channel not found
476*/
477int channel_get_credentials(const char *channel, std::string &user,
478 std::string &password);
479
480/**
481 Method to get the network namespace configured for a channel
482
483 @param[in] channel The channel name
484 @param[out] net_ns The network namespace to extract
485
486 @return the operation status
487 @retval false OK
488 @retval true Error, channel not found
489*/
490int channel_get_network_namespace(const char *channel, std::string &net_ns);
491
492/**
493 Return type for function
494 has_any_slave_channel_open_temp_table_or_is_its_applier_running()
495*/
497 /*
498 None of all slave channel appliers are running and none
499 of all slave channels have open temporary table(s).
500 */
502 /* At least one slave channel applier is running. */
504 /* At least one slave channel has open temporary table(s). */
507
508/**
509 Checks if any slave channel applier is running or any slave channel has open
510 temporary table(s). This holds handled appliers' run_locks until finding a
511 running slave channel applier or a slave channel which has open temporary
512 table(s), or handling all slave channels.
513
514 @return SLAVE_CHANNEL_NO_APPLIER_RUNNING_AND_NO_OPEN_TEMPORARY_TABLE,
515 SLAVE_CHANNEL_APPLIER_IS_RUNNING or
516 SLAVE_CHANNEL_HAS_OPEN_TEMPORARY_TABLE.
517*/
520
521/**
522 Delete stored credentials from Slave_credentials
523 @param[in] channel_name The channel name
524
525 @return the operation status
526 @retval 0 OK
527 @retval 1 Error, channel not found
528
529 */
530int channel_delete_credentials(const char *channel_name);
531
532/**
533 Start channels which have SOURCE_CONNECTION_AUTO_FAILOVER=1.
534
535 @return the operation status
536 @retval false OK
537 @retval true Error
538 */
540
541/**
542 Set SOURCE_CONNECTION_AUTO_FAILOVER on the given channel
543 to the given status value.
544
545 @param[in] channel The channel name
546 @param[in] status true, enables SOURCE_CONNECTION_AUTO_FAILOVER
547 false, disables SOURCE_CONNECTION_AUTO_FAILOVER
548
549 @return the operation status
550 @retval false OK
551 @retval true Error
552 */
554 bool status);
555
556/**
557 Unset SOURCE_CONNECTION_AUTO_FAILOVER=0 on all channels.
558
559 @return the operation status
560 @retval false OK
561 @retval true Error
562 */
564
565/**
566 Reload the status values on `Rpl_acf_status_configuration`
567 singleton.
568 */
570
571/**
572 Get replication failover channels configuration in
573 a serialized
574 protobuf_replication_asynchronous_connection_failover::SourceAndManagedAndStatusList
575 message.
576
577 @param[out] serialized_configuration the serialized configuration
578
579 @return the operation status
580 @retval false OK
581 @retval true Error
582 */
584 std::string &serialized_configuration);
585
586/**
587 Set replication failover channels configuration that was
588 received from the group.
589 Each member of the group will send its own configuration
590 in a serialized
591 protobuf_replication_asynchronous_connection_failover::SourceAndManagedAndStatusList
592 message.
593
594 @param[in] exchanged_replication_failover_channels_serialized_configuration
595 vector with the serialized configuration from each member
596
597 @return the operation status
598 @retval false OK
599 @retval true Error
600 */
602 const std::vector<std::string>
603 &exchanged_replication_failover_channels_serialized_configuration);
604
605/**
606 Collect and broadcast the replication failover channels configuration
607 in a serialized
608 protobuf_replication_asynchronous_connection_failover::SourceAndManagedAndStatusList
609 message, that will override the configuration on all group members.
610
611 @return the operation status
612 @retval false OK
613 @retval true Error
614 */
616
617#endif // RPL_SERVICE_INTERFACE_INCLUDE
static my_thread_id thread_id
Definition: my_thr_init.cc:63
static char * password
Definition: mysql_secure_installation.cc:56
char * user
Definition: mysqladmin.cc:60
Definition: buf0block_hint.cc:30
static bool timeout(bool(*wait_condition)())
Timeout function.
Definition: log0meb.cc:496
required uint32 status
Definition: replication_asynchronous_connection_failover.proto:61
required string type
Definition: replication_group_member_actions.proto:34
int channel_queue_packet(const char *channel, const char *buf, unsigned long len)
Queues a event packet into the current active channel.
Definition: rpl_channel_service_interface.cc:881
int channel_wait_until_transactions_applied(const char *channel, const char *gtid_set, double timeout, bool update_THD_status=true)
Checks if all the transactions in the given set were executed.
Definition: rpl_channel_service_interface.cc:940
enum_channel_until_condition
The known until conditions that can be applied to channels.
Definition: rpl_channel_service_interface.h:133
@ CHANNEL_UNTIL_APPLIER_AFTER_GAPS
Definition: rpl_channel_service_interface.h:137
@ CHANNEL_UNTIL_VIEW_ID
Definition: rpl_channel_service_interface.h:138
@ CHANNEL_UNTIL_APPLIER_AFTER_GTIDS
Definition: rpl_channel_service_interface.h:136
@ CHANNEL_UNTIL_APPLIER_BEFORE_GTIDS
Definition: rpl_channel_service_interface.h:135
@ CHANNEL_NO_UNTIL_CONDITION
Definition: rpl_channel_service_interface.h:134
int channel_start(const char *channel, Channel_connection_info *connection_info, int threads_to_start, int wait_for_connection, bool use_server_mta_configuration=false, bool channel_map_already_locked=false)
Start the Applier/Receiver threads according to the given options.
Definition: rpl_channel_service_interface.cc:418
bool is_any_slave_channel_running_with_failover_enabled(int thread_mask)
Checks if any slave threads of any channel configured with SOURCE_CONNECTION_AUTO_FAILOVER is running...
Definition: rpl_channel_service_interface.cc:1239
int channel_wait_until_apply_queue_applied(const char *channel, double timeout)
Checks if all the queued transactions were executed.
Definition: rpl_channel_service_interface.cc:901
bool is_any_slave_channel_running(int thread_mask)
Checks if any slave threads of any channel is running.
Definition: rpl_channel_service_interface.cc:1201
int channel_stop(const char *channel, int threads_to_stop, long timeout)
Stops the channel threads according to the given options.
Definition: rpl_channel_service_interface.cc:593
bool start_failover_channels()
Start channels which have SOURCE_CONNECTION_AUTO_FAILOVER=1.
Definition: rpl_channel_service_interface.cc:1337
void initialize_channel_connection_info(Channel_connection_info *channel_info)
Definition: rpl_channel_service_interface.cc:230
int binlog_dump_thread_kill()
Kills the Binlog Dump threads.
Definition: rpl_channel_service_interface.cc:668
int channel_delete_credentials(const char *channel_name)
Delete stored credentials from Slave_credentials.
Definition: rpl_channel_service_interface.cc:1331
int channel_create(const char *channel, Channel_creation_info *channel_information)
Initializes a channel connection in a similar way to a change master command.
Definition: rpl_channel_service_interface.cc:285
int channel_is_applier_thread_waiting(unsigned long thread_id, bool worker=false)
Checks if the applier thread, and its workers when parallel applier is enabled, has already consumed ...
Definition: rpl_channel_service_interface.cc:1016
enum_slave_channel_status
Return type for function has_any_slave_channel_open_temp_table_or_is_its_applier_running()
Definition: rpl_channel_service_interface.h:496
@ SLAVE_CHANNEL_HAS_OPEN_TEMPORARY_TABLE
Definition: rpl_channel_service_interface.h:505
@ SLAVE_CHANNEL_APPLIER_IS_RUNNING
Definition: rpl_channel_service_interface.h:503
@ SLAVE_CHANNEL_NO_APPLIER_RUNNING_AND_NO_OPEN_TEMPORARY_TABLE
Definition: rpl_channel_service_interface.h:501
bool get_replication_failover_channels_configuration(std::string &serialized_configuration)
Get replication failover channels configuration in a serialized protobuf_replication_asynchronous_con...
Definition: rpl_channel_service_interface.cc:1423
enum_channel_type
Types of channels.
Definition: rpl_channel_service_interface.h:51
@ GROUP_REPLICATION_CHANNEL
Definition: rpl_channel_service_interface.h:53
@ SLAVE_REPLICATION_CHANNEL
Definition: rpl_channel_service_interface.h:52
int channel_add_executed_gtids_to_received_gtids(const char *channel)
Adds server executed GTID set to channel received GTID set.
Definition: rpl_channel_service_interface.cc:860
void initialize_channel_creation_info(Channel_creation_info *channel_info)
Definition: rpl_channel_service_interface.cc:191
int channel_get_network_namespace(const char *channel, std::string &net_ns)
Method to get the network namespace configured for a channel.
Definition: rpl_channel_service_interface.cc:1114
void initialize_channel_ssl_info(Channel_ssl_info *channel_ssl_info)
Definition: rpl_channel_service_interface.cc:216
int channel_stop_all(int threads_to_stop, long timeout, std::string *error_message)
Stops all the running channel threads according to the given options.
Definition: rpl_channel_service_interface.cc:607
bool channel_has_same_uuid_as_group_name(const char *group_name)
Checks if any running channel uses the same UUID for assign_gtids_to_anonymous_transactions as the gr...
Definition: rpl_channel_service_interface.cc:1178
bool channel_change_source_connection_auto_failover(const char *channel, bool status)
Set SOURCE_CONNECTION_AUTO_FAILOVER on the given channel to the given status value.
Definition: rpl_channel_service_interface.cc:1368
int channel_purge_queue(const char *channel, bool reset_all)
Purges the channel logs.
Definition: rpl_channel_service_interface.cc:676
int channel_flush(const char *channel)
Flush the channel.
Definition: rpl_channel_service_interface.cc:1036
enum_slave_channel_status has_any_slave_channel_open_temp_table_or_is_its_applier_running()
Checks if any slave channel applier is running or any slave channel has open temporary table(s).
Definition: rpl_channel_service_interface.cc:1281
bool set_replication_failover_channels_configuration(const std::vector< std::string > &exchanged_replication_failover_channels_serialized_configuration)
Set replication failover channels configuration that was received from the group.
Definition: rpl_channel_service_interface.cc:1430
int channel_get_thread_id(const char *channel, enum_channel_thread_types thread_type, unsigned long **thread_id, bool need_lock=true)
Returns the id(s) of the channel threads: receiver or applier.
Definition: rpl_channel_service_interface.cc:732
bool channel_is_stopping(const char *channel, enum_channel_thread_types type)
Tells if the selected component of the channel is stopping or not.
Definition: rpl_channel_service_interface.cc:1135
int channel_get_retrieved_gtid_set(const char *channel, char **retrieved_set)
Returns the receiver thread retrieved GTID set in string format.
Definition: rpl_channel_service_interface.cc:1055
void reload_failover_channels_status()
Reload the status values on Rpl_acf_status_configuration singleton.
Definition: rpl_channel_service_interface.cc:1416
bool force_my_replication_failover_channels_configuration_on_all_members()
Collect and broadcast the replication failover channels configuration in a serialized protobuf_replic...
Definition: rpl_channel_service_interface.cc:1441
long long channel_get_last_delivered_gno(const char *channel, int sidno)
Returns last GNO from applier from a given UUID.
Definition: rpl_channel_service_interface.cc:825
bool is_partial_transaction_on_channel_relay_log(const char *channel)
Checks if the given channel's relaylog contains a partial transaction.
Definition: rpl_channel_service_interface.cc:1165
int channel_is_applier_waiting(const char *channel)
Checks if the applier, and its workers when parallel applier is enabled, has already consumed all rel...
Definition: rpl_channel_service_interface.cc:969
bool unset_source_connection_auto_failover_on_all_channels()
Unset SOURCE_CONNECTION_AUTO_FAILOVER=0 on all channels.
Definition: rpl_channel_service_interface.cc:1399
bool channel_is_active(const char *channel, enum_channel_thread_types type)
Tells if the selected component of the channel is active or not.
Definition: rpl_channel_service_interface.cc:701
int initialize_channel_service_interface()
Initializes channel structures if needed.
Definition: rpl_channel_service_interface.cc:91
int channel_get_credentials(const char *channel, std::string &user, std::string &password)
Method to get the credentials configured for a channel.
Definition: rpl_channel_service_interface.cc:1080
enum_multi_threaded_workers_type
Know parallelization options that can be applied to channel appliers.
Definition: rpl_channel_service_interface.h:59
@ CHANNEL_MTS_PARALLEL_TYPE_LOGICAL_CLOCK
Definition: rpl_channel_service_interface.h:61
@ CHANNEL_MTS_PARALLEL_TYPE_DB_NAME
Definition: rpl_channel_service_interface.h:60
enum_channel_thread_types
The known types of channel threads.
Definition: rpl_channel_service_interface.h:124
@ CHANNEL_NO_THD
Definition: rpl_channel_service_interface.h:125
@ CHANNEL_RECEIVER_THREAD
Definition: rpl_channel_service_interface.h:126
@ CHANNEL_APPLIER_THREAD
Definition: rpl_channel_service_interface.h:127
static const Thread_to_stop threads_to_stop[]
Definition: srv0start.cc:1342
Channel information to connect to a receiver.
Definition: rpl_channel_service_interface.h:144
int until_condition
Definition: rpl_channel_service_interface.h:145
char * view_id
Definition: rpl_channel_service_interface.h:147
char * gtid
Definition: rpl_channel_service_interface.h:146
Creation information for a channel.
Definition: rpl_channel_service_interface.h:88
char * compression_algorithm
Definition: rpl_channel_service_interface.h:108
char * hostname
Definition: rpl_channel_service_interface.h:90
int channel_mts_parallel_type
Definition: rpl_channel_service_interface.h:96
char * public_key_path
Definition: rpl_channel_service_interface.h:105
int sql_delay
Definition: rpl_channel_service_interface.h:101
bool m_allow_drop_write_set
Definition: rpl_channel_service_interface.h:113
int m_source_connection_auto_failover
Definition: rpl_channel_service_interface.h:111
unsigned int zstd_compression_level
Definition: rpl_channel_service_interface.h:109
int replicate_same_server_id
Definition: rpl_channel_service_interface.h:99
int connect_retry
Definition: rpl_channel_service_interface.h:102
int channel_mts_parallel_workers
Definition: rpl_channel_service_interface.h:97
enum_channel_type type
Definition: rpl_channel_service_interface.h:89
int port
Definition: rpl_channel_service_interface.h:91
char * user
Definition: rpl_channel_service_interface.h:92
int retry_count
Definition: rpl_channel_service_interface.h:103
bool preserve_relay_logs
Definition: rpl_channel_service_interface.h:104
int get_public_key
Definition: rpl_channel_service_interface.h:106
int channel_mta_checkpoint_group
Definition: rpl_channel_service_interface.h:98
bool m_ignore_write_set_memory_limit
Definition: rpl_channel_service_interface.h:112
char * password
Definition: rpl_channel_service_interface.h:93
int thd_tx_priority
Definition: rpl_channel_service_interface.h:100
Channel_ssl_info * ssl_info
Definition: rpl_channel_service_interface.h:94
int auto_position
Definition: rpl_channel_service_interface.h:95
SSL information to be used when creating a channel.
Definition: rpl_channel_service_interface.h:68
char * ssl_key
Definition: rpl_channel_service_interface.h:75
char * ssl_ca_file_name
Definition: rpl_channel_service_interface.h:70
char * ssl_crl_file_name
Definition: rpl_channel_service_interface.h:73
int use_ssl
Definition: rpl_channel_service_interface.h:69
int ssl_verify_server_cert
Definition: rpl_channel_service_interface.h:77
char * tls_ciphersuites
Definition: rpl_channel_service_interface.h:79
char * ssl_cipher
Definition: rpl_channel_service_interface.h:76
char * tls_version
Definition: rpl_channel_service_interface.h:78
char * ssl_cert_file_name
Definition: rpl_channel_service_interface.h:72
char * ssl_crl_directory
Definition: rpl_channel_service_interface.h:74
char * ssl_ca_directory
Definition: rpl_channel_service_interface.h:71
Definition: task.h:427