[MXS-1251] detect_replication_lag can break replication failover Created: 2017-04-25  Updated: 2017-09-20  Resolved: 2017-09-20

Status: Closed
Project: MariaDB MaxScale
Component/s: mariadbmon
Affects Version/s: 2.0.5
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: VAROQUI Stephane Assignee: markus makela
Resolution: Not a Bug Votes: 0
Labels: None

Sprint: 2017-42

 Description   

when maxscale is setup to monitor replication lag . Maxscale can run SQL command on the slaves

CREATE DATABASE IF NOT EXISTS maxscale_schema;
CREATE TABLE IF NOT EXISTS maxscale_schema.replication_heartbeat (maxscale_id INT NOT NULL, master_server_id INT NOT NULL, master_timestamp INT UNSIGNED NOT NULL, PRIMARY KEY ( master_server_id, maxscale_id ) ) ENGINE=MYISAM DEFAULT CHARSET=latin1;
CREATE DATABASE IF NOT EXISTS maxscale_schema;
CREATE TABLE IF NOT EXISTS maxscale_schema.replication_heartbeat (maxscale_id INT NOT NULL, master_server_id INT NOT NULL, master_timestamp INT UNSIGNED NOT NULL, PRIMARY KEY ( master_server_id, maxscale_id ) ) ENGINE=MYISAM DEFAULT CHARSET=latin1;

I propose that when state is slave and no table is discovered such insert are made on the master , and until it discovered monitor replication delay is disable



 Comments   
Comment by VAROQUI Stephane [ 2017-04-25 ]

I confirm the tables do exists on the slave after provisioning

Comment by VAROQUI Stephane [ 2017-04-25 ]

I confirm that the maxscale user have enouth grants to detect that those tables exists
Grants for maxscale@10.0.11.190
GRANT RELOAD, SHOW DATABASES, REPLICATION CLIENT ON . TO 'maxscale'@'10.0.11.190' IDENTIFIED BY PASSWORD '*'
GRANT ALL PRIVILEGES ON `mysql`.* TO 'maxscale'@'10.0.11.190'
GRANT ALL PRIVILEGES ON `maxscale_schema`.* TO 'maxscale'@'10.0.11.190'

Comment by VAROQUI Stephane [ 2017-04-25 ]

The client is using 2 maxscale so there is probably a grant issue i ask them to shutdown one of them

Comment by markus makela [ 2017-09-20 ]

The replication heartbeat table is only created on the master. No operations are done on the slaves that would modify data in any way.

Generated at Thu Feb 08 04:05:20 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.