Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
10.1.13
-
10.1.24
Description
wsrep_gtid_mode currently requires nodes to have the same log_bin path for it to work. This path can be checked at run-time by looking at log_bin_basename. 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
- blocks
-
MDEV-20720 Galera: Replicate MariaDB GTID to other nodes in the cluster
- Closed
- relates to
-
MDEV-9855 log_slave_updates is required for wsrep_gtid_mode
- Closed