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

Changes to wsrep_gtid_domain_id in my.cnf are ignored on node restart

    XMLWordPrintable

Details

    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

      Attachments

        Issue Links

          Activity

            People

              jplindst Jan Lindström (Inactive)
              hholzgra Hartmut Holzgraefe
              Votes:
              3 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.