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