MySQL 8.4.2
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 REPLICATION SOURCE.
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 replication source
87 command
88*/
91 char *hostname;
92 int port;
93 char *user;
94 char *password;
101 int thd_tx_priority; // The applier thread priority
103 int connect_retry; // How many seconds to wait between retries.
104 int retry_count; // Limits the number of reconnection attempts
105 bool preserve_relay_logs; // If the logs should be preserved on creation
106 char *public_key_path; // RSA Public key information
107 int get_public_key; // Preference to get public key from donor if not
108 // available
111 /* to enable async connection failover */
115};
116
118
119// Start settings
120
121/**
122 The known types of channel threads.
123 All new types should be power of 2
124*/
130
131/**
132 The known until conditions that can be applied to channels
133*/
141
142/**
143 Channel information to connect to a receiver
144*/
146 int until_condition; // base on enum_channel_until_condition
147 char *gtid; // Gtids to wait on a until condition
148 char *view_id; // The view id to wait on a until condition
149};
150
152
153/**
154 Initializes a channel connection in a similar way to a change replication
155 source command.
156
157 @note If the channel exists, it is reconfigured with the new options.
158 About the logs, the preserve_relay_logs option allows the user to
159 maintain them untouched.
160
161 @param channel The channel name
162 @param channel_information Channel creation information.
163
164 @return the operation status
165 @retval 0 OK
166 @retval !=0 Error on channel creation
167*/
168int channel_create(const char *channel,
169 Channel_creation_info *channel_information);
170
171/**
172 Start the Applier/Receiver threads according to the given options.
173 If the receiver thread is to be started, connection credential must be
174 supported.
175
176 @param channel The channel name
177 @param connection_info Channel connection information
178 @param threads_to_start The types of threads to be started
179 @param wait_for_connection If when starting the receiver, the method should
180 wait for the connection to succeed
181 @param use_server_mta_configuration
182 If true, the channel uses the server parallel
183 applier configuration when starting the applier
184 thread, instead of the configuration given on
185 `channel_create()`
186 @param channel_map_already_locked
187 If set to true, will not acquire a write
188 lock of channel_map
189
190 @return the operation status
191 @retval 0 OK
192 @retval !=0 Error
193 */
194int channel_start(const char *channel, Channel_connection_info *connection_info,
195 int threads_to_start, int wait_for_connection,
196 bool use_server_mta_configuration = false,
197 bool channel_map_already_locked = false);
198
199/**
200 Stops the channel threads according to the given options.
201
202 @param channel The channel name
203 @param threads_to_stop The types of threads to be stopped
204 @param timeout The expected time in which the thread should stop
205 @return the operation status
206 @retval 0 OK
207 @retval !=0 Error
208*/
209int channel_stop(const char *channel, int threads_to_stop, long timeout);
210
211/**
212 Kills the Binlog Dump threads.
213
214 @return the operation status
215 @retval 0 OK
216*/
218
219/**
220 Stops all the running channel threads according to the given options.
221
222 @param threads_to_stop The types of threads to be stopped
223 @param timeout The expected time in which the thread should stop
224 @param error_message The returned error_message
225
226 @return the operation status
227 @retval 0 OK
228 @retval !=0 Error
229*/
231 std::string *error_message);
232/**
233 Purges the channel logs
234
235 @param channel The channel name
236 @param reset_all If true, the method will purge logs and remove the channel
237 If false, only the channel information will be reset.
238
239 @return the operation status
240 @retval 0 OK
241 @retval !=0 Error
242*/
243int channel_purge_queue(const char *channel, bool reset_all);
244
245/**
246 Tells if the selected component of the channel is active or not.
247 If no component is passed, this method returns if the channel exists or not
248
249 @param channel The channel name
250 @param type The thread that should be checked.
251 If 0, this method applies to the channel existence.
252
253 @return is the channel (component) active
254 @retval true Yes
255 @retval false No
256*/
258
259/**
260 Returns the id(s) of the channel threads: receiver or applier.
261 If more than one applier exists, an array is returned, on which first
262 index is coordinator thread id.
263
264 @param[in] channel The channel name
265 @param[in] thread_type The thread type (receiver or applier)
266 @param[out] thread_id The array of id(s)
267 @param[in] need_lock Is channel_map read lock needed?
268
269 @return the number of returned ids
270 @retval -1 the channel does no exists, or the thread is not present
271 @retval >0 the number of thread ids returned.
272*/
273int channel_get_thread_id(const char *channel,
274 enum_channel_thread_types thread_type,
275 unsigned long **thread_id, bool need_lock = true);
276
277/**
278 Returns last GNO from applier from a given UUID.
279
280 @param channel the channel name
281 @param sidno the uuid associated to the desired gno
282
283 @return the last applier gno
284 @retval <0 the channel does no exists, or the applier is not present
285 @retval >0 the gno
286*/
287long long channel_get_last_delivered_gno(const char *channel, int sidno);
288
289/**
290 Adds server executed GTID set to channel received GTID set.
291
292 @param channel the channel name
293
294 @return the operation status
295 @retval 0 OK
296 @retval != 0 Error
297*/
299
300/**
301 Queues a event packet into the current active channel.
302
303 @param channel the channel name
304 @param buf the event buffer
305 @param len the event buffer length
306
307 @return the operation status
308 @retval 0 OK
309 @retval != 0 Error on queue
310*/
311int channel_queue_packet(const char *channel, const char *buf,
312 unsigned long len);
313
314/**
315 Checks if all the queued transactions were executed.
316
317 @note This method assumes that the channel is not receiving any more events.
318 If it is still receiving, then the method should wait for execution of
319 transactions that were present when this method was invoked.
320
321 @param channel the channel name
322 @param timeout the time (seconds) after which the method returns if the
323 above condition was not satisfied
324
325 @return the operation status
326 @retval 0 All transactions were executed
327 @retval REPLICATION_THREAD_WAIT_TIMEOUT_ERROR A timeout occurred
328 @retval REPLICATION_THREAD_WAIT_NO_INFO_ERROR An error occurred
329*/
331
332/**
333 Checks if all the transactions in the given set were executed.
334
335 @param channel the channel name
336 @param gtid_set the set in string format of transaction to wait for
337 @param timeout the time (seconds) after which the method returns if the
338 above condition was not satisfied
339 @param update_THD_status Shall the method update the THD stage
340
341 @return the operation status
342 @retval 0 All transactions were executed
343 @retval REPLICATION_THREAD_WAIT_TIMEOUT_ERROR A timeout occurred
344 @retval REPLICATION_THREAD_WAIT_NO_INFO_ERROR An error occurred
345*/
347 const char *gtid_set,
348 double timeout,
349 bool update_THD_status = true);
350
351/**
352 Checks if the applier, and its workers when parallel applier is
353 enabled, has already consumed all relay log, that is, applier is
354 waiting for transactions to be queued.
355
356 @param channel The channel name
357
358 @return the operation status
359 @retval <0 Error
360 @retval 0 Applier is not waiting
361 @retval 1 Applier is waiting
362*/
363int channel_is_applier_waiting(const char *channel);
364
365/**
366 Checks if the applier thread, and its workers when parallel applier is
367 enabled, has already consumed all relay log, that is, applier thread
368 is waiting for transactions to be queued.
369
370 @param thread_id the applier thread id to check
371 @param worker flag to indicate if thread is a parallel worker
372
373 @return the operation status
374 @retval -1 Unable to find applier thread
375 @retval 0 Applier thread is not waiting
376 @retval 1 Applier thread is waiting
377*/
379 bool worker = false);
380
381/**
382 Flush the channel.
383
384 @return the operation status
385 @retval 0 OK
386 @retval != 0 Error on flush
387*/
388int channel_flush(const char *channel);
389
390/**
391 Initializes channel structures if needed.
392
393 @return the operation status
394 @retval 0 OK
395 @retval != 0 Error on queue
396*/
398
399/**
400 Returns the receiver thread retrieved GTID set in string format.
401
402 @param channel The channel name.
403 @param[out] retrieved_set Pointer to pointer to string. The function will
404 set it to point to a newly allocated buffer, or
405 NULL on out of memory.
406
407 @return the operation status
408 @retval 0 OK
409 @retval !=0 Error on retrieval
410*/
411int channel_get_retrieved_gtid_set(const char *channel, char **retrieved_set);
412
413/**
414 Tells if the selected component of the channel is stopping or not.
415
416 @param channel The channel name
417 @param type The thread that should be checked.
418
419 @return is the channel (component) stopping
420 @retval true Yes
421 @retval false No, no type was specified or the channel does not exist.
422*/
424
425/**
426 Checks if the given channel's relaylog contains a partial transaction.
427
428 @param channel The channel name
429
430 @retval true If relaylog contains partial transcation.
431 @retval false If relaylog does not contain partial transaction.
432*/
434
435/**
436 Checks if any slave threads of any channel is running
437
438 @param[in] thread_mask type of slave thread- IO/SQL or any
439
440 @retval true at least one channel thread is running.
441 @retval false none of the the channels are running.
442*/
443bool is_any_slave_channel_running(int thread_mask);
444
445/**
446 Checks if any slave threads of any channel configured with
447 SOURCE_CONNECTION_AUTO_FAILOVER is running.
448
449 @param[in] thread_mask type of slave thread- IO/SQL or any
450
451 @retval true at least one channel threads are running.
452 @retval false none of the the channels are running.
453*/
455
456/**
457 Checks if any running channel uses the same UUID for
458 assign_gtids_to_anonymous_transactions as the group_name
459
460 @param[in] group_name the group name
461
462 @retval true at least one channel has the same uuid
463 @retval false none of the the channels have the same
464 uuid
465*/
466bool channel_has_same_uuid_as_group_name(const char *group_name);
467
468/**
469 Method to get the credentials configured for a channel
470
471 @param[in] channel The channel name
472 @param[out] user The user to extract
473 @param[out] password The password to extract
474
475 @return the operation status
476 @retval false OK
477 @retval true Error, channel not found
478*/
479int channel_get_credentials(const char *channel, std::string &user,
480 std::string &password);
481
482/**
483 Method to get the network namespace configured for a channel
484
485 @param[in] channel The channel name
486 @param[out] net_ns The network namespace to extract
487
488 @return the operation status
489 @retval false OK
490 @retval true Error, channel not found
491*/
492int channel_get_network_namespace(const char *channel, std::string &net_ns);
493
494/**
495 Return type for function
496 has_any_slave_channel_open_temp_table_or_is_its_applier_running()
497*/
499 /*
500 None of all slave channel appliers are running and none
501 of all slave channels have open temporary table(s).
502 */
504 /* At least one slave channel applier is running. */
506 /* At least one slave channel has open temporary table(s). */
509
510/**
511 Checks if any slave channel applier is running or any slave channel has open
512 temporary table(s). This holds handled appliers' run_locks until finding a
513 running slave channel applier or a slave channel which has open temporary
514 table(s), or handling all slave channels.
515
516 @return SLAVE_CHANNEL_NO_APPLIER_RUNNING_AND_NO_OPEN_TEMPORARY_TABLE,
517 SLAVE_CHANNEL_APPLIER_IS_RUNNING or
518 SLAVE_CHANNEL_HAS_OPEN_TEMPORARY_TABLE.
519*/
522
523/**
524 Delete stored credentials from Slave_credentials
525 @param[in] channel_name The channel name
526
527 @return the operation status
528 @retval 0 OK
529 @retval 1 Error, channel not found
530
531 */
532int channel_delete_credentials(const char *channel_name);
533
534/**
535 Start channels which have SOURCE_CONNECTION_AUTO_FAILOVER=1.
536
537 @return the operation status
538 @retval false OK
539 @retval true Error
540 */
542
543/**
544 Set SOURCE_CONNECTION_AUTO_FAILOVER on the given channel
545 to the given status value.
546
547 @param[in] channel The channel name
548 @param[in] status true, enables SOURCE_CONNECTION_AUTO_FAILOVER
549 false, disables SOURCE_CONNECTION_AUTO_FAILOVER
550
551 @return the operation status
552 @retval false OK
553 @retval true Error
554 */
556 bool status);
557
558/**
559 Unset SOURCE_CONNECTION_AUTO_FAILOVER=0 on all channels.
560
561 @return the operation status
562 @retval false OK
563 @retval true Error
564 */
566
567/**
568 Reload the status values on `Rpl_acf_status_configuration`
569 singleton.
570 */
572
573/**
574 Get replication failover channels configuration in
575 a serialized
576 protobuf_replication_asynchronous_connection_failover::SourceAndManagedAndStatusList
577 message.
578
579 @param[out] serialized_configuration the serialized configuration
580
581 @return the operation status
582 @retval false OK
583 @retval true Error
584 */
586 std::string &serialized_configuration);
587
588/**
589 Set replication failover channels configuration that was
590 received from the group.
591 Each member of the group will send its own configuration
592 in a serialized
593 protobuf_replication_asynchronous_connection_failover::SourceAndManagedAndStatusList
594 message.
595
596 @param[in] exchanged_replication_failover_channels_serialized_configuration
597 vector with the serialized configuration from each member
598
599 @return the operation status
600 @retval false OK
601 @retval true Error
602 */
604 const std::vector<std::string>
605 &exchanged_replication_failover_channels_serialized_configuration);
606
607/**
608 Collect and broadcast the replication failover channels configuration
609 in a serialized
610 protobuf_replication_asynchronous_connection_failover::SourceAndManagedAndStatusList
611 message, that will override the configuration on all group members.
612
613 @return the operation status
614 @retval false OK
615 @retval true Error
616 */
618
619/**
620 Calculate transactions that are waiting to be applied on channel.
621
622 gtid_set_to_apply will contain a list of UUIDs with intervals that represent
623 transactions that will be applied.
624
625 @param[in] channel name of the channel
626 @param[out] gtid_set_to_apply transactions on backlog to be applied.
627
628 @return the operation status
629 @retval 0 OK
630 @retval !=0 Error
631 */
633 std::string &gtid_set_to_apply);
634
635#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:58
char * user
Definition: mysqladmin.cc:66
Definition: buf0block_hint.cc:30
static bool timeout(bool(*wait_condition)())
Timeout function.
Definition: log0meb.cc:498
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:878
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:937
enum_channel_until_condition
The known until conditions that can be applied to channels.
Definition: rpl_channel_service_interface.h:134
@ CHANNEL_UNTIL_APPLIER_AFTER_GAPS
Definition: rpl_channel_service_interface.h:138
@ CHANNEL_UNTIL_VIEW_ID
Definition: rpl_channel_service_interface.h:139
@ CHANNEL_UNTIL_APPLIER_AFTER_GTIDS
Definition: rpl_channel_service_interface.h:137
@ CHANNEL_UNTIL_APPLIER_BEFORE_GTIDS
Definition: rpl_channel_service_interface.h:136
@ CHANNEL_NO_UNTIL_CONDITION
Definition: rpl_channel_service_interface.h:135
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:415
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:1283
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:898
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:1245
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:590
bool start_failover_channels()
Start channels which have SOURCE_CONNECTION_AUTO_FAILOVER=1.
Definition: rpl_channel_service_interface.cc:1381
void initialize_channel_connection_info(Channel_connection_info *channel_info)
Definition: rpl_channel_service_interface.cc:224
int binlog_dump_thread_kill()
Kills the Binlog Dump threads.
Definition: rpl_channel_service_interface.cc:665
int channel_delete_credentials(const char *channel_name)
Delete stored credentials from Slave_credentials.
Definition: rpl_channel_service_interface.cc:1375
int channel_get_gtid_set_to_apply(const char *channel, std::string &gtid_set_to_apply)
Calculate transactions that are waiting to be applied on channel.
Definition: rpl_channel_service_interface.cc:1132
int channel_create(const char *channel, Channel_creation_info *channel_information)
Initializes a channel connection in a similar way to a change replication source command.
Definition: rpl_channel_service_interface.cc:279
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:1013
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:498
@ SLAVE_CHANNEL_HAS_OPEN_TEMPORARY_TABLE
Definition: rpl_channel_service_interface.h:507
@ SLAVE_CHANNEL_APPLIER_IS_RUNNING
Definition: rpl_channel_service_interface.h:505
@ SLAVE_CHANNEL_NO_APPLIER_RUNNING_AND_NO_OPEN_TEMPORARY_TABLE
Definition: rpl_channel_service_interface.h:503
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:1467
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:857
void initialize_channel_creation_info(Channel_creation_info *channel_info)
Definition: rpl_channel_service_interface.cc:185
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:1111
void initialize_channel_ssl_info(Channel_ssl_info *channel_ssl_info)
Definition: rpl_channel_service_interface.cc:210
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:604
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:1222
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:1412
int channel_purge_queue(const char *channel, bool reset_all)
Purges the channel logs.
Definition: rpl_channel_service_interface.cc:673
int channel_flush(const char *channel)
Flush the channel.
Definition: rpl_channel_service_interface.cc:1033
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:1325
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:1474
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:729
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:1179
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:1052
void reload_failover_channels_status()
Reload the status values on Rpl_acf_status_configuration singleton.
Definition: rpl_channel_service_interface.cc:1460
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:1485
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:822
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:1209
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:966
bool unset_source_connection_auto_failover_on_all_channels()
Unset SOURCE_CONNECTION_AUTO_FAILOVER=0 on all channels.
Definition: rpl_channel_service_interface.cc:1443
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:698
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:1077
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:125
@ CHANNEL_NO_THD
Definition: rpl_channel_service_interface.h:126
@ CHANNEL_RECEIVER_THREAD
Definition: rpl_channel_service_interface.h:127
@ CHANNEL_APPLIER_THREAD
Definition: rpl_channel_service_interface.h:128
static const Thread_to_stop threads_to_stop[]
Definition: srv0start.cc:1344
Channel information to connect to a receiver.
Definition: rpl_channel_service_interface.h:145
int until_condition
Definition: rpl_channel_service_interface.h:146
char * view_id
Definition: rpl_channel_service_interface.h:148
char * gtid
Definition: rpl_channel_service_interface.h:147
Creation information for a channel.
Definition: rpl_channel_service_interface.h:89
char * compression_algorithm
Definition: rpl_channel_service_interface.h:109
char * hostname
Definition: rpl_channel_service_interface.h:91
int channel_mts_parallel_type
Definition: rpl_channel_service_interface.h:97
char * public_key_path
Definition: rpl_channel_service_interface.h:106
int sql_delay
Definition: rpl_channel_service_interface.h:102
bool m_allow_drop_write_set
Definition: rpl_channel_service_interface.h:114
int m_source_connection_auto_failover
Definition: rpl_channel_service_interface.h:112
unsigned int zstd_compression_level
Definition: rpl_channel_service_interface.h:110
int replicate_same_server_id
Definition: rpl_channel_service_interface.h:100
int connect_retry
Definition: rpl_channel_service_interface.h:103
int channel_mts_parallel_workers
Definition: rpl_channel_service_interface.h:98
enum_channel_type type
Definition: rpl_channel_service_interface.h:90
int port
Definition: rpl_channel_service_interface.h:92
char * user
Definition: rpl_channel_service_interface.h:93
int retry_count
Definition: rpl_channel_service_interface.h:104
bool preserve_relay_logs
Definition: rpl_channel_service_interface.h:105
int get_public_key
Definition: rpl_channel_service_interface.h:107
int channel_mta_checkpoint_group
Definition: rpl_channel_service_interface.h:99
bool m_ignore_write_set_memory_limit
Definition: rpl_channel_service_interface.h:113
char * password
Definition: rpl_channel_service_interface.h:94
int thd_tx_priority
Definition: rpl_channel_service_interface.h:101
Channel_ssl_info * ssl_info
Definition: rpl_channel_service_interface.h:95
int auto_position
Definition: rpl_channel_service_interface.h:96
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