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