[MDEV-25115] Changes to wsrep_gtid_domain_id in my.cnf are ignored on node restart Created: 2021-03-11  Updated: 2022-07-26  Resolved: 2021-08-18

Status: Closed
Project: MariaDB Server
Component/s: Galera, wsrep
Affects Version/s: 10.5.9
Fix Version/s: 10.5.13, 10.6.5

Type: Bug Priority: Major
Reporter: Hartmut Holzgraefe Assignee: Jan Lindström (Inactive)
Resolution: Fixed Votes: 3
Labels: None

Issue Links:
Relates
relates to MDEV-29171 changing the value of wsrep_gtid_doma... Closed

 Description   

wsrep_gtid_domain_id is listed as a dynamic variable, and it can indeed be changed at runtime using SET GLOBAL; but when changing its value in the option files the change is not really picked up.

I originally started up the cluster with

wsrep-gtid-mode=ON
wsrep_gtid_domain_id=100

and I can confirm that the value gets indeed set to 100:

MariaDB [test]> show global variables like 'wsrep_gtid_domain_id';
+----------------------+-------+
| Variable_name        | Value |
+----------------------+-------+
| wsrep_gtid_domain_id | 100   |
+----------------------+-------+
1 row in set (0.001 sec)
 
MariaDB [test]> select variable_name, global_value, global_value_origin, global_value_path from information_schema.system_variables where variable_name='WSREP_GTID_DOMAIN_ID'\G
*************************** 1. row ***************************
      variable_name: WSREP_GTID_DOMAIN_ID
       global_value: 100
global_value_origin: CONFIG
  global_value_path: /etc/mysql/conf.d/galera.cnf
1 row in set (0.001 sec)

Now changing the value to 200 in

{galera.cnf}

and restarting the MariaDB service, I still get a value of 100, not 200, but I_S still claims it was set to that value via galera.cnf:

MariaDB [test]> select variable_name, global_value, global_value_origin, global_value_path from information_schema.system_variables where variable_name='WSREP_GTID_DOMAIN_ID'\G
*************************** 1. row ***************************
      variable_name: WSREP_GTID_DOMAIN_ID
       global_value: 100
global_value_origin: CONFIG
  global_value_path: /etc/mysql/conf.d/galera.cnf
1 row in set (0.001 sec)

If I set it via SET GLOBAL, and make sure that at least one transaction is committed while this setting is active, that value gets preserved over restarts:

SET GLOBAL wsrep_gtid_domain_id=300;
BEGIN; INSERT INTO test.t1 VALUES(1); COMMIT

... restart ...

MariaDB [test]> select variable_name, global_value, global_value_origin, global_value_path from information_schema.system_variables where variable_name='WSREP_GTID_DOMAIN_ID'\G
*************************** 1. row ***************************
      variable_name: WSREP_GTID_DOMAIN_ID
       global_value: 300
global_value_origin: CONFIG
  global_value_path: /etc/mysql/conf.d/galera.cnf
1 row in set (0.001 sec)

When restarting the other nodes they keep their original wsrep_gtid_domain_id though, and do not switch to 300.

So the value is apparently pulled from some galera file at startup, and the value in the options file is only acting as a fallback.

This is:

a) confusing
b) should clearly be documented if going to stay this way
c) having I_S.SYSTEM_VARIABLES lie about the true value origin


Generated at Thu Feb 08 09:35:15 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.