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

Attached Slave to Galera cluster Node (Master) consider Master server_id and wsrep_gtid_domain_id for local (slave) Transaction

    XMLWordPrintable

Details

    Description

      DC1 :-

      vmc11, vmc12, vmc13

      DC2

      vmc21 , vmc22 , vmc 23

      Unidirectional Replication :-

      vmc11 (server_id=1 and wsrep_gtid_domain_id=1 )--> vmc 21 (server_id=2 and wsrep_gtid_domain_id=2 )
      
      

      1. Enable WSREP GTID parameters on all node of the Galera cluster

      vmc11

       
      MariaDB [(none)]> select @@gtid_domain_id, @@server_id, @@wsrep_gtid_domain_id,@@wsrep_gtid_mode;
      +------------------+-------------+------------------------+-------------------+
      | @@gtid_domain_id | @@server_id | @@wsrep_gtid_domain_id | @@wsrep_gtid_mode |
      +------------------+-------------+------------------------+-------------------+
      |               11 |           1 |                      1 |                 1 |
      +------------------+-------------+------------------------+-------------------+
      

      For vmc12 gtid_domain_id=12 and vmc13 gtid_domain_id=13 rest all same as mentioned above.

       
      2. Bootstrap one node.
      3. Perform some DDL or DML transactions on vmc11
      4. Check  GTID value, its as expected one (No issue).
      5. Take mariabackup and restore the same on another DC node 1 of galera cluster.
      6. Stop service--> remove data dir content--> copy back --> change ownership --> bootstrap with galera_new_cluster
      7. Another Cluster node is having server_id and wsrep_gtid_domain_id as 2 
      
      

      vmc21

       
      MariaDB [(none)]> select @@gtid_domain_id, @@server_id, @@wsrep_gtid_domain_id,@@wsrep_gtid_mode;
      +------------------+-------------+------------------------+-------------------+
      | @@gtid_domain_id | @@server_id | @@wsrep_gtid_domain_id | @@wsrep_gtid_mode |
      +------------------+-------------+------------------------+-------------------+
      |               21 |           2 |                      2 |                 1 |
      +------------------+-------------+------------------------+-------------------+
      
      

      8. Perform some DDL or DML transactions on local node vmc21
      9. Check the GTID value, not expected value (local transactions get stored with server_id=1 and wsrep_gtid_domain_id=1 while local node server_id=2 and wsrep_gtid_domain_id=2)
      10. Now lets enable the Replication from vmc11-->vmc21 with GTID.
      11. Perform some DDL or DML transaction again on vmc11
      12. Check the GTID value , expected value.
      13. Lets perform local transaction again on vmc21

       
      MariaDB [(none)]> select @@hostname;
      +------------+
      | @@hostname |
      +------------+
      | vmc21      |
      +------------+
      1 row in set (0.000 sec)
       
      MariaDB [(none)]> create database sbtest100;
      Query OK, 1 row affected (0.001 sec)
       
      MariaDB [(none)]> drop database sbtest100;
      Query OK, 0 rows affected (0.002 sec)
       
      MariaDB [(none)]> show binlog events in 'mysql-bin.000002' from 892;
      +------------------+------+------------+-----------+-------------+---------------------------+
      | Log_name         | Pos  | Event_type | Server_id | End_log_pos | Info                      |
      +------------------+------+------------+-----------+-------------+---------------------------+
      | mysql-bin.000002 |  892 | Gtid       |         1 |         934 | GTID 1-1-3                |
      | mysql-bin.000002 |  934 | Query      |         1 |        1036 | create database sbtest100 |
      | mysql-bin.000002 | 1036 | Gtid       |         1 |        1078 | GTID 1-1-4                |
      | mysql-bin.000002 | 1078 | Query      |         1 |        1178 | drop database sbtest100   |
      +------------------+------+------------+-----------+-------------+---------------------------+
      
      

      vmc21 :- GTID value consist of server_id and wsrep_gtid_domain_id of vmc11 i.e 1 and 1 while local server_id and wsrep_gtid_domain_id is 2 .

      Attachments

        Issue Links

          Activity

            People

              jplindst Jan Lindström (Inactive)
              pramod.mahto@mariadb.com Pramod Mahto
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.