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

Mariadb Galera cluster fails when replicating from Mysql 5.7 on use of DDL

Details

    Description

      Similar to previous Jira issue MDEV-34180

      HOST: mysql, mysql 5.7.44 binlog_format=ROW
      HOST: m1, mariadb 10.6 GALERA NODE replicating from HOST mysql, Using_Gtid: No (log file and position)
      HOST: m2 mariadb 10.6 GALERA NODE
      HOST: m3 mariadb 10.6 GALERA NODE

      Run this command on mysql:

      CREATE TABLE `tt_mem` (
        `mem_id` bigint(20) NOT NULL,
        `mem_description` varchar(100) DEFAULT NULL,
        PRIMARY KEY (`mem_id`)
      ) ENGINE=MEMORY DEFAULT CHARSET=utf8mb4;
      

      Error on m1:

      2024-05-22 16:11:07 1 [ERROR] WSREP: Vote 0 (success) on 78cebda7-1876-11ef-896b-8a58fca50d36:2565 is inconsistent with group. Leaving cluster.
      

      Error on m2 and m3:

      2024-05-22 16:11:06 2 [ERROR] Error in Log_event::read_log_event(): 'Found invalid event in binary log', data_len: 42, event_type: -94
      2024-05-22 16:11:06 2 [ERROR] WSREP: applier could not read binlog event, seqno: 2565, len: 482
      

      OTHER COMMANDS THAT PRODUCE SIMILAR ERRORS

      CREATE TABLE `aa_tab` (
        `col1` int(11) NOT NULL,
        `col2` varchar(100) DEFAULT NULL,
        PRIMARY KEY (`col1`)
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
      

      rename table aa_tab to dd_tab;
      

      alter table aa_tab add column col3 varchar(10) after col2;
      

      drop table aa_tab;
      

      grant select on *.* to `edward`@`%`;
      

      Attachments

        Issue Links

          Activity

            A workaround is to replicate from mysql to a stand-alone mariadb with log_slave_updates=ON then from the stand-alone replicate to the Mariadb Galera cluster. This works without error.

            edward Edward Stoever added a comment - A workaround is to replicate from mysql to a stand-alone mariadb with log_slave_updates=ON then from the stand-alone replicate to the Mariadb Galera cluster. This works without error.
            ltning Eirik Øverby added a comment - - edited

            I reported this issue.
            Note that it also affects 10.11 - which is the version we use.
            /Eirik

            ltning Eirik Øverby added a comment - - edited I reported this issue. Note that it also affects 10.11 - which is the version we use. /Eirik

            I just added GRANT to the list of commands.

            edward Edward Stoever added a comment - I just added GRANT to the list of commands.

            Linking issue that look like they could be the same underlying root cause

            knielsen Kristian Nielsen added a comment - Linking issue that look like they could be the same underlying root cause

            The "event_type: -94" in the error message on nodes m2 and m3 refers to a GTID_EVENT. This is the event that begins all event groups (InnoDB transactions or DDL/GRANT/etc.), and exists in the MariaDB binlogs but not in the MySQL binlogs. So the node m1 would not have seen an event type -94/GTID_EVENT (It would see a corresponding MySQL BEGIN or GTID event), and presumably m1 generated a GTID_EVENT instead to send to nodes m2/m3. So it is possible that this difference in starting event for the event group triggered the bug on m2/m3.

            (Just an observation, I have not analysed in detail what goes wrong in the Galera code).

            knielsen Kristian Nielsen added a comment - The "event_type: -94" in the error message on nodes m2 and m3 refers to a GTID_EVENT. This is the event that begins all event groups (InnoDB transactions or DDL/GRANT/etc.), and exists in the MariaDB binlogs but not in the MySQL binlogs. So the node m1 would not have seen an event type -94/GTID_EVENT (It would see a corresponding MySQL BEGIN or GTID event), and presumably m1 generated a GTID_EVENT instead to send to nodes m2/m3. So it is possible that this difference in starting event for the event group triggered the bug on m2/m3. (Just an observation, I have not analysed in detail what goes wrong in the Galera code).
            janlindstrom Jan Lindström added a comment - https://github.com/MariaDB/server/pull/3736
            hemantdangi Hemant Dangi added a comment -

            The issue can be reproduced for mysql 5.7.44, 8.0.39 and 9.0.1.

            The patch is tested for mysql 5.7.44, 8.0.39 and 9.0.1

            hemantdangi Hemant Dangi added a comment - The issue can be reproduced for mysql 5.7.44, 8.0.39 and 9.0.1. The patch is tested for mysql 5.7.44, 8.0.39 and 9.0.1

            Thanks, the fix has been merged with the main revision: https://github.com/MariaDB/server/commit/c0b11e75fff9ea513cd6cccfe47837678cedb473

            sysprg Julius Goryavsky added a comment - Thanks, the fix has been merged with the main revision: https://github.com/MariaDB/server/commit/c0b11e75fff9ea513cd6cccfe47837678cedb473

            People

              sysprg Julius Goryavsky
              edward Edward Stoever
              Votes:
              1 Vote for this issue
              Watchers:
              8 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.