Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-9856

wsrep_gtid_mode requires nodes to have the same log_bin_basename

    Details

    • Sprint:
      10.1.24

      Description

      wsrep_gtid_mode currently requires nodes to have the same log_bin_basename for it to work. Is this intentional?

      For example, let's say we have a 2-node cluster.

      Node 1 has the following:

      MariaDB [(none)]> SHOW GLOBAL VARIABLES LIKE 'gtid%pos';
      +------------------+------------------------+
      | Variable_name    | Value                  |
      +------------------+------------------------+
      | gtid_binlog_pos  | 0-1-5,1-1-63334,3-1-15 |
      | gtid_current_pos | 0-1-5,1-1-63334,3-1-15 |
      | gtid_slave_pos   |                        |
      +------------------+------------------------+
      3 rows in set (0.00 sec)
       
      MariaDB [(none)]> SHOW GLOBAL VARIABLES LIKE 'log_bin_basename';
      +------------------+----------------------------+
      | Variable_name    | Value                      |
      +------------------+----------------------------+
      | log_bin_basename | /var/lib/mysql/mariadb-bin |
      +------------------+----------------------------+
      1 row in set (0.00 sec)
       
      MariaDB [(none)]> SHOW GLOBAL VARIABLES LIKE 'wsrep_gtid%';
      +----------------------+-------+
      | Variable_name        | Value |
      +----------------------+-------+
      | wsrep_gtid_domain_id | 3     |
      | wsrep_gtid_mode      | ON    |
      +----------------------+-------+
      2 rows in set (0.00 sec)
      

      Let's say that I start up node 2 with a configuration with these parameters:

      wsrep_gtid_mode=ON
      wsrep_gtid_domain_id=3
      log_bin=mariadb-bin
      wsrep_sst_method=rsync
      

      When it starts up, it looks good:

      MariaDB [(none)]> SHOW GLOBAL VARIABLES LIKE 'gtid%pos';
      +------------------+------------------------+
      | Variable_name    | Value                  |
      +------------------+------------------------+
      | gtid_binlog_pos  | 0-1-5,1-1-63334,3-2-14 |
      | gtid_current_pos | 3-2-14                 |
      | gtid_slave_pos   |                        |
      +------------------+------------------------+
      3 rows in set (0.01 sec)
       
      MariaDB [(none)]> SHOW GLOBAL VARIABLES LIKE 'log_bin_basename';
      +------------------+----------------------------+
      | Variable_name    | Value                      |
      +------------------+----------------------------+
      | log_bin_basename | /var/lib/mysql/mariadb-bin |
      +------------------+----------------------------+
      1 row in set (0.00 sec)
       
      MariaDB [(none)]> SHOW GLOBAL VARIABLES LIKE 'wsrep_gtid%';
      +----------------------+-------+
      | Variable_name        | Value |
      +----------------------+-------+
      | wsrep_gtid_domain_id | 3     |
      | wsrep_gtid_mode      | ON    |
      +----------------------+-------+
      2 rows in set (0.00 sec)
      

      But what happens if we change log_bin and restart the server? It doesn't look so good:

      MariaDB [(none)]> SHOW GLOBAL VARIABLES LIKE 'gtid%pos';
      +------------------+-------+
      | Variable_name    | Value |
      +------------------+-------+
      | gtid_binlog_pos  | 3-1-1 |
      | gtid_current_pos |       |
      | gtid_slave_pos   |       |
      +------------------+-------+
      3 rows in set (0.01 sec)
       
      MariaDB [(none)]> SHOW GLOBAL VARIABLES LIKE 'log_bin_basename';
      +------------------+-----------------------------+
      | Variable_name    | Value                       |
      +------------------+-----------------------------+
      | log_bin_basename | /var/lib/mysql/mariadb-bin1 |
      +------------------+-----------------------------+
      1 row in set (0.00 sec)
       
      MariaDB [(none)]> SHOW GLOBAL VARIABLES LIKE 'wsrep_gtid%';
      +----------------------+-------+
      | Variable_name        | Value |
      +----------------------+-------+
      | wsrep_gtid_domain_id | 3     |
      | wsrep_gtid_mode      | ON    |
      +----------------------+-------+
      2 rows in set (0.00 sec)
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jplindst Jan Lindström
                Reporter:
                GeoffMontee Geoff Montee
              • Votes:
                2 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated: