Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
10.5.10
-
None
-
CentOS Linux release 7.7.1908 (Core)
Description
The gtid_current_pos variable on galera node does not get updated on other nodes.
I have 2 node galera cluster along with maxscale.
From maxscale :
[root@ip-172-31-12-219 centos]# maxctrl list servers
┌─────────┬──────────────┬──────┬─────────────┬─────────────────────────┬────────┐
│ Server │ Address │ Port │ Connections │ State │ GTID │
├─────────┼──────────────┼──────┼─────────────┼─────────────────────────┼────────┤
│ server1 │ 18.207.3.40 │ 3333 │ 0 │ Master, Synced, Running │ 1-1-15 │
├─────────┼──────────────┼──────┼─────────────┼─────────────────────────┼────────┤
│ server2 │ 54.237.3.158 │ 3333 │ 0 │ Slave, Synced, Running │ │
└─────────┴──────────────┴──────┴─────────────┴─────────────────────────┴────────┘
As per the maxscale, server1 is a master and it's showing gtid_current_pos "1-1-15".
Server 1:
MariaDB [(none)]> show global variables like '%gtid%';
-------------------------------+
Variable_name | Value |
-------------------------------+
gtid_binlog_pos | 1-1-15 |
gtid_binlog_state | 1-1-15 |
gtid_cleanup_batch_size | 64 |
gtid_current_pos | 1-1-15 |
gtid_domain_id | 201 |
gtid_ignore_duplicates | OFF |
gtid_pos_auto_engines | |
gtid_slave_pos | |
gtid_strict_mode | OFF |
wsrep_gtid_domain_id | 1 |
wsrep_gtid_mode | ON |
-------------------------------+
11 rows in set (0.001 sec)
Server 2 :
MariaDB [(none)]> show global variables like 'gtid%';
-------------------------------+
Variable_name | Value |
-------------------------------+
gtid_binlog_pos | 1-1-15 |
gtid_binlog_state | 1-1-15 |
gtid_cleanup_batch_size | 64 |
gtid_current_pos | |
gtid_domain_id | 202 |
gtid_ignore_duplicates | OFF |
gtid_pos_auto_engines | |
gtid_slave_pos | |
gtid_strict_mode | OFF |
-------------------------------+
9 rows in set (0.001 sec)
In server2 the gtid_current_pos is empty. Now I have stopped the mariadb service in server1.
Now server2 is my master.
[root@ip-172-31-12-219 centos]# maxctrl list servers
┌─────────┬──────────────┬──────┬─────────────┬─────────────────────────┬──────┐
│ Server │ Address │ Port │ Connections │ State │ GTID │
├─────────┼──────────────┼──────┼─────────────┼─────────────────────────┼──────┤
│ server1 │ 18.207.3.40 │ 3333 │ 0 │ Down │ │
├─────────┼──────────────┼──────┼─────────────┼─────────────────────────┼──────┤
│ server2 │ 54.237.3.158 │ 3333 │ 0 │ Master, Synced, Running │ │
└─────────┴──────────────┴──────┴─────────────┴─────────────────────────┴──────┘
Now I have inserted some data on server2 , and checked the gtid_current_pos still it's showing empty value.
MariaDB [test]> create table t1 (id int,name varchar(20));
Query OK, 0 rows affected (0.010 sec)
MariaDB [test]> insert into t1 values(1,'kjsdlad');
Query OK, 1 row affected (0.002 sec)
MariaDB [test]> insert into t1 values(2,'mmznb');
Query OK, 1 row affected (0.001 sec)
MariaDB [test]> insert into t1 values(3,'rock');
Query OK, 1 row affected (0.002 sec)
MariaDB [test]> insert into t1 values(4,'khlcsk');
Query OK, 1 row affected (0.002 sec)
MariaDB [test]> insert into t1 values(5,'lcsk');
Query OK, 1 row affected (0.004 sec)
MariaDB [test]> show global variables like 'gtid%';
-------------------------------+
Variable_name | Value |
-------------------------------+
gtid_binlog_pos | 1-1-20 |
gtid_binlog_state | 1-1-20 |
gtid_cleanup_batch_size | 64 |
gtid_current_pos | |
gtid_domain_id | 202 |
gtid_ignore_duplicates | OFF |
gtid_pos_auto_engines | |
gtid_slave_pos | |
gtid_strict_mode | OFF |
-------------------------------+
9 rows in set (0.001 sec)
why we are not seeing gtid_current_pos for other slave servers ?
If I switch the master server still it's showing empty.