[MXS-2580] Clarify requirements of binlog router secondary masters Created: 2019-06-27  Updated: 2021-01-25  Resolved: 2021-01-25

Status: Closed
Project: MariaDB MaxScale
Component/s: binlogrouter, Documentation
Affects Version/s: None
Fix Version/s: 2.5.7

Type: Task Priority: Major
Reporter: Johan Wikman Assignee: Johan Wikman
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Blocks
is blocked by MXS-2581 Support DO_DOMAIN_IDS and IGNORE_DOMA... Closed
Relates
relates to MDEV-22905 Support DO_DOMAIN_IDS and IGNORE_DOMA... Closed
relates to MXS-1484 Automatically set binlog storage to ... Closed
relates to MDEV-20715 Implement system variable to disallow... Closed
Epic Link: Pinloki Project

 Description   

https://mariadb.com/kb/en/mariadb-maxscale-23-binlogrouter/#using-secondary-masters



 Comments   
Comment by Geoff Montee (Inactive) [ 2019-06-27 ]

I have a suggestion for this.

In the case of Galera Cluster, there are two GTID domains--gtid_domain_id and wsrep_gtid_domain_id. Only the domain defined by wsrep_gtid_domain_id is used for transactions that are replicated by Galera Cluster. The domain defined by gtid_domain_id is only used for transactions that are local to the node. This means that gtid_domain_id is likely to get out of sync between cluster nodes for all sorts of reasons.

I would suggest updating the documentation, so that DO_DOMAIN_IDS = (<wsrep_gtid_domain_id>) is set in the CHANGE MASTER command.

https://mariadb.com/kb/en/library/change-master-to/#do_domain_ids

However, it looks like MaxScale 2.3.8 doesn't support the DO_DOMAIN_IDS option yet, so it would have to be implemented first. I created MXS-2581 for this.

i.e. if wsrep_gtid_domain_id=2, then the command for the primary master would be:

# mysql -h $MAXSCALE_HOST -P $MAXCALE_PORT
MariaDB> SET @@global.gtid_slave_pos='0-198-123';
MariaDB> CHANGE MASTER TO
         MASTER_HOST='192.168.10.5',
         MASTER_PORT=3306,
         MASTER_USER='repl',
         MASTER_PASSWORD='repl',
         MASTER_USE_GTID=Slave_pos,
         DO_DOMAIN_IDS=(2);

And the command for the secondary master would be:

MariaDB> CHANGE MASTER ':2' TO
         MASTER_HOST='192.168.10.6',
         MASTER_PORT=3306,
         MASTER_USER='repl',
         MASTER_PASSWORD='repl',
         MASTER_USE_GTID=Slave_pos,
         DO_DOMAIN_IDS=(2);

Comment by Geoff Montee (Inactive) [ 2019-10-02 ]

If MariaDB Server supported something like MDEV-20715, then that could make failover between secondary masters a lot safer with Galera Cluster.

Comment by Niclas Antti [ 2021-01-25 ]

The new binlogrouter has an option "select_master" which allows it to use a master of a cluster monitored by maridbmon or galeramon.

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