[MDEV-32740] wsrep_gtid_domain_id is disregarded on any node other than bootstrapped node when the wsrep_gtid_mode is set to ON with wsrep_provider_version 26.4.14 (Galera 4) Created: 2023-11-09  Updated: 2023-12-23  Resolved: 2023-12-23

Status: Closed
Project: MariaDB Server
Component/s: Galera
Affects Version/s: 10.4.28, 10.5.19, 10.6.12, 10.8.7, 10.9.5, 10.10.3, 10.7
Fix Version/s: 10.4.33, 10.5.24, 10.6.17, 10.11.7, 11.0.5, 11.1.4, 11.2.3

Type: Bug Priority: Critical
Reporter: Pramod Mahto Assignee: Julius Goryavsky
Resolution: Fixed Votes: 1
Labels: None

Issue Links:
Relates
relates to MDEV-31413 Node has been dropped from the cluste... Closed
relates to MDEV-31905 WSREP GTID MODE is inconsistent Closed

 Description   

When enabling wsrep_gtid_mode as 'ON,' Galera should take into account the wsrep_gtid_domain_id value for GTID across all nodes within the same Galera cluster.
However, this consideration does not occur if the wsrep_gtid_domain_id is defined as anything other than the default value of 0 except bootstrap node.

As per documents https://galeracluster.com/library/documentation/mariadb-options.html#mariadb-options

When wsrep_gtid_mode is set to ON, wsrep_gtid_domain_id is used in place of gtid_domain_id for all Galera Cluster write sets.

Impact of the same :

Replicating from one Galera cluster to another Galera cluster will result in a break in replication.
This is because mariabackup may not maintain consistency with the GTID values captured within xtrabackup_binlog_info.

The failure of bi-directional replication occurred when attempting to connect two Galera clusters due to the requirement for a distinct wsrep_gtid_domain_id value.
As a result, adding a Slave node to the Galera cluster replication becomes the only viable solution.

Test Cases(Failed) :-

10.5.21
galera-4-26.4.14-1.el7.centos.x86_64
wsrep_patch_version wsrep_26.22
wsrep_provider_version    26.4.14
 
10.5.22
galera-4-26.4.14-1.el7.centos.x86_64
wsrep_patch_version wsrep_26.22
wsrep_provider_version    26.4.14
 
10.6.15 
galera-4-26.4.14-1.el7.centos.x86_64
wsrep_patch_version wsrep_26.22
wsrep_provider_version    26.4.14

GTID related Parameter configured on nodes

Node-01

 
server_id=901
gtid_domain_id=204
wsrep_gtid_domain_id=9898
wsrep_gtid_mode=ON
gtid_strict_mode=OFF

Node-02

 
server_id=901
gtid_domain_id=205
wsrep_gtid_domain_id=9898
wsrep_gtid_mode=ON
gtid_strict_mode=OFF

If the user defines a value other than 0 (default) for wsrep_gtid_domain_id, Node-02 will always take into account wsrep_gtid_domain_id=0.

Test Case(Success) :-

 
10.5.18  and lower version having Galera version 4 (26.4.13)
galera-4-26.4.13-1.el7.centos.x86_64
wsrep_patch_version wsrep_26.22
wsrep_provider_version    26.4.13

MariaDB Server bundled with wsrep_provider_version 26.4.13 can be used without any issues



 Comments   
Comment by Pramod Mahto [ 2023-11-09 ]

Test case :-

Build 2 or 3 nodes Galera cluster with above GTID parameters value:-

Node-01

create database gs_test;
 
show global variables like '%gtid%';
 
gtid_binlog_pos	        9898-901-1
gtid_binlog_state	9898-901-1
gtid_current_pos	9898-901-1

On Node -02

show global variables like '%gtid%'
 
gtid_binlog_pos	        0-901-1
gtid_binlog_state	0-901-1
gtid_current_pos	0-901-1

Node-02 not consider value for wsrep_gtid_domain_id rather considering 0 (default value)

Comment by Julius Goryavsky [ 2023-12-23 ]

Fixed as part of the https://jira.mariadb.org/browse/MDEV-31905

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