Skip to content

Commit e49beab

Browse files
author
Hemant Dangi
committed
wl#12649: Automatic connection failover for Async Replication Channels
- Step I: Automatic Connection Failover This worklog implements a mechanism in asynchronous replication that makes the receiver (the secondary) automatically try to re-establish an asynchronous replication connection to another sender (a primary), in case the current connection gets interrupted due to the failure of the current sender. RB: 24074 Reviewed by: Luis Soares <luis.soares@oracle.com> Reviewed by: Anibal Pinto <anibal.pinto@oracle.com> Reviewed by: Jaideep Karande <jaideep.karande@oracle.com>
1 parent 2f356b3 commit e49beab

115 files changed

Lines changed: 6507 additions & 85 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

mysql-test/collections/default.push

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ perl mysql-test-run.pl --timer --testcase-timeout=30 --suite-timeout=300 --debug
88

99
# Group Replication
1010
perl mysql-test-run.pl --timer --force --parallel=6 --comment=group_replication --vardir=var-group_replication --suite=group_replication
11+
12+
# rpl_gtid
13+
perl mysql-test-run.pl --debug-server --force --timer --big-test --testcase-timeout=90 --comment=rpl_gtid-big --vardir=var-rpl_gtid-big --suite=rpl_gtid
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
--let $_tmp_gtid_mode= `SELECT @@GLOBAL.GTID_MODE`
2+
if ($_tmp_gtid_mode != 'OFF')
3+
{
4+
--skip Test requires gtid_mode = OFF
5+
}

mysql-test/r/1st.result

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ password_history
2727
plugin
2828
procs_priv
2929
proxies_priv
30+
replication_asynchronous_connection_failover
3031
role_edges
3132
server_cost
3233
servers

mysql-test/r/connect.result

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ password_history
2020
plugin
2121
procs_priv
2222
proxies_priv
23+
replication_asynchronous_connection_failover
2324
role_edges
2425
server_cost
2526
servers
@@ -65,6 +66,7 @@ password_history
6566
plugin
6667
procs_priv
6768
proxies_priv
69+
replication_asynchronous_connection_failover
6870
role_edges
6971
server_cost
7072
servers

mysql-test/r/dictionary_tablespace.result

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ password_history mysql
5050
plugin mysql
5151
procs_priv mysql
5252
proxies_priv mysql
53+
replication_asynchronous_connection_failover mysql
5354
resource_groups mysql
5455
role_edges mysql
5556
routines mysql
@@ -118,6 +119,7 @@ password_history
118119
plugin
119120
procs_priv
120121
proxies_priv
122+
replication_asynchronous_connection_failover
121123
resource_groups
122124
role_edges
123125
routines

mysql-test/r/information_schema_ci.result

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ password_history
125125
plugin
126126
procs_priv
127127
proxies_priv
128+
replication_asynchronous_connection_failover
128129
role_edges
129130
server_cost
130131
servers
@@ -885,8 +886,8 @@ table_schema IN ('mysql', 'information_schema', 'test', 'mysqltest')
885886
AND table_name not like 'ndb%' AND table_name COLLATE utf8_general_ci not like 'innodb_%'
886887
GROUP BY TABLE_SCHEMA;
887888
TABLE_SCHEMA count(*)
888-
information_schema 47
889-
mysql 31
889+
information_schema 48
890+
mysql 32
890891
create table t1 (i int, j int);
891892
create trigger trg1 before insert on t1 for each row
892893
begin

mysql-test/r/information_schema_cs.result

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ password_history
125125
plugin
126126
procs_priv
127127
proxies_priv
128+
replication_asynchronous_connection_failover
128129
role_edges
129130
server_cost
130131
servers
@@ -885,8 +886,8 @@ table_schema IN ('mysql', 'information_schema', 'test', 'mysqltest')
885886
AND table_name not like 'ndb%' AND table_name COLLATE utf8_general_ci not like 'innodb_%'
886887
GROUP BY TABLE_SCHEMA;
887888
TABLE_SCHEMA count(*)
888-
information_schema 47
889-
mysql 31
889+
information_schema 48
890+
mysql 32
890891
create table t1 (i int, j int);
891892
create trigger trg1 before insert on t1 for each row
892893
begin

mysql-test/r/information_schema_keywords.result

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,7 @@ LONGBLOB 1
315315
LONGTEXT 1
316316
LOOP 1
317317
LOW_PRIORITY 1
318+
MANAGED 0
318319
MASTER 0
319320
MASTER_AUTO_POSITION 0
320321
MASTER_BIND 1

mysql-test/r/mysqlcheck.result

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ mysql.password_history OK
2323
mysql.plugin OK
2424
mysql.procs_priv OK
2525
mysql.proxies_priv OK
26+
mysql.replication_asynchronous_connection_failover OK
2627
mysql.role_edges OK
2728
mysql.server_cost OK
2829
mysql.servers OK
@@ -106,6 +107,9 @@ status : OK
106107
mysql.proxies_priv
107108
note : Table does not support optimize, doing recreate + analyze instead
108109
status : OK
110+
mysql.replication_asynchronous_connection_failover
111+
note : Table does not support optimize, doing recreate + analyze instead
112+
status : OK
109113
mysql.role_edges
110114
note : Table does not support optimize, doing recreate + analyze instead
111115
status : OK
@@ -170,6 +174,7 @@ mysql.password_history OK
170174
mysql.plugin OK
171175
mysql.procs_priv OK
172176
mysql.proxies_priv OK
177+
mysql.replication_asynchronous_connection_failover OK
173178
mysql.role_edges OK
174179
mysql.server_cost OK
175180
mysql.servers OK
@@ -246,6 +251,9 @@ status : OK
246251
mysql.proxies_priv
247252
note : Table does not support optimize, doing recreate + analyze instead
248253
status : OK
254+
mysql.replication_asynchronous_connection_failover
255+
note : Table does not support optimize, doing recreate + analyze instead
256+
status : OK
249257
mysql.role_edges
250258
note : Table does not support optimize, doing recreate + analyze instead
251259
status : OK

mysql-test/r/mysqldump.result

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5327,6 +5327,7 @@ CREATE TABLE IF NOT EXISTS `slave_master_info` (
53275327
`Master_compression_algorithm` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'Compression algorithm supported for data transfer between master and slave.',
53285328
`Master_zstd_compression_level` int unsigned NOT NULL COMMENT 'Compression level associated with zstd compression algorithm.',
53295329
`Tls_ciphersuites` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'Ciphersuites used for TLS 1.3 communication with the master server.',
5330+
`Managed` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Indicates whether the channel is monitored on failures.',
53305331
PRIMARY KEY (`Channel_name`)
53315332
) /*!50100 TABLESPACE `mysql` */ ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 ROW_FORMAT=DYNAMIC COMMENT='Master Information';
53325333
/*!40101 SET character_set_client = @saved_cs_client */;

0 commit comments

Comments
 (0)