replication-manager icon indicating copy to clipboard operation
replication-manager copied to clipboard

MySQL positional replicaton is a problem.

Open nyxneuf opened this issue 3 years ago • 4 comments

OS : CentOS7 DB : MySQL 5.7 SRM : replication-manager-osc-2.1.5-1.x86_64

[Master/Slave] GTID & Positional Replication. Test is no problem.

[Master/Slave/Slave] GTID mode. Test is no problem.

[Master/Slave/Slave] Positional Replication Test is problem.

Switchover and Fail-Over do not work.

nyxneuf avatar Jun 04 '21 07:06 nyxneuf

Did you try with pseudo-gtid

svaroqui avatar Jun 04 '21 07:06 svaroqui

Trying Pseudo Test!

  • Log

time="2021-06-07 10:53:15" level=error msg="Could not get pseudoGTID on slave [192.168.50.13:3307 Error 1146: Table 'replication_manager_schema.pseudo_gtid_v' doesn't exist], %!s(MISSING)" cluster=cluster_mysql57_3307 time="2021-06-07 10:53:15" level=error msg="Could not get pseudoGTID on slave 192.168.50.13:3307, Error 1146: Table 'replication_manager_schema.pseudo_gtid_v' doesn't exist" cluster=cluster_mysql57_3307 error="Error 1146: Table 'replication_manager_schema.pseudo_gtid_v' doesn't exist" module=MasterFailover server="192.168.50.13:3307" sql="select * from replication_manager_schema.pseudo_gtid_v" time="2021-06-07 10:53:15" level=info msg="select * from replication_manager_schema.pseudo_gtid_v" cluster=cluster_mysql57_3307 module=MasterFailover server="192.168.50.13:3307" time="2021-06-07 10:53:15" level=info msg="Found pseudoGTID " cluster=cluster_mysql57_3307 time="2021-06-07 10:53:15" level=info msg="show binlog events IN 'mysql-bin.000001' from 4 LIMIT 60\n" cluster=cluster_mysql57_3307 module=MasterFailover server="192.168.50.13:3307" time="2021-06-07 10:53:15" level=info msg="Found Coordinates on slave mysql-bin.000001, 4" cluster=cluster_mysql57_3307 time="2021-06-07 10:53:15" level=error msg="Could not find number of events after pseudoGTID in slave [192.168.50.13:3307 Error 1220: Error when executing command SHOW BINLOG EVENTS: Could not find target log], %!s(MISSING)" cluster=cluster_mysql57_3307 time="2021-06-07 10:53:15" level=error msg="Could not find number of events after pseudoGTID in slave 192.168.50.13:3307, Error 1220: Error when executing command SHOW BINLOG EVENTS: Could not find target log" cluster=cluster_mysql57_3307 error="Error 1220: Error when executing command SHOW BINLOG EVENTS: Could not find target log" module=MasterFailover server="192.168.50.13:3307" sql="show binlog events IN 'mysql-bin.000001' from 4 LIMIT 1\nshow binlog events IN '123' from 4 LIMIT 1\n" time="2021-06-07 10:53:15" level=info msg="show binlog events IN 'mysql-bin.000001' from 4 LIMIT 1\nshow binlog events IN '123' from 4 LIMIT 1\n" cluster=cluster_mysql57_3307 module=MasterFailover server="192.168.50.13:3307" time="2021-06-07 10:53:15" level=info msg="Found 0 events to skip after coordinates on slave mysql-bin.000001,4" cluster=cluster_mysql57_3307 time="2021-06-07 10:53:15" level=info msg="show binlog events IN 'mysql-bin.000001' from 4 LIMIT 60\n" cluster=cluster_mysql57_3307 module=MasterFailover server="192.168.50.12:3307" time="2021-06-07 10:53:15" level=info msg="Found coordinate on master mysql-bin.000001 ,4" cluster=cluster_mysql57_3307 time="2021-06-07 10:53:15" level=info msg="show binlog events IN 'mysql-bin.000001' from 4 LIMIT 0" cluster=cluster_mysql57_3307 module=MasterFailover server="192.168.50.12:3307"

  • MySQL Table

mysql> show databases; +----------------------------+ | Database | +----------------------------+ | information_schema | | mysql | | performance_schema | | replication_manager_schema | | sys | +----------------------------+ 5 rows in set (0.00 sec)

mysql> use replication_manager_schema Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A

Database changed mysql> show tables; +--------------------------------------+ | Tables_in_replication_manager_schema | +--------------------------------------+ | jobs | +--------------------------------------+ 1 row in set (0.00 sec)

mysql>

nyxneuf avatar Jun 07 '21 01:06 nyxneuf

Hi Nyxneuf,

Thanks for testing

This isssue is probably because you did not setup

autorejoin-slave-positional-heartbeat = true

Now for slave to use no GTID i look at code and found out that

force-slave-no-gtid-mode = true can help

I started working on some test case but probably no possible to get finished before 2 weeks being pretty buzzy now

Any way any help in testing is welcome

svaroqui avatar Jun 07 '21 06:06 svaroqui

My Test SRM config.

force-slave-no-gtid-mode = true autorejoin-slave-positional-heartbeat = true

I applied the above option and tested it.

nyxneuf avatar Jun 07 '21 07:06 nyxneuf