Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-2580

Clarify requirements of binlog router secondary masters

Details

    Attachments

      Issue Links

        Activity

          GeoffMontee Geoff Montee (Inactive) added a comment - - edited

          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);
          

          GeoffMontee Geoff Montee (Inactive) added a comment - - edited 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);

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

          GeoffMontee Geoff Montee (Inactive) added a comment - If MariaDB Server supported something like MDEV-20715 , then that could make failover between secondary masters a lot safer with Galera Cluster.
          nantti Niclas Antti added a comment -

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

          nantti Niclas Antti added a comment - The new binlogrouter has an option "select_master" which allows it to use a master of a cluster monitored by maridbmon or galeramon.

          People

            johan.wikman Johan Wikman
            johan.wikman Johan Wikman
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.