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

replication breaks when using optimistic replication and replica is a galera node

Details

    Description

      When a galera node is a replica of an upstream cluster it is impossible to enable optimistic replication, because the expected conflicts that stem from this replication mode will cause galera code to immediately abort replication.

      2023-05-17 13:57:20 6930586 [Note] WSREP: ha_rollback_trans(6930586) rolled back: Deadlock found when trying to get lock; try restarting transaction; is_real 0
      2023-05-17 13:57:20 6930586 [Note] WSREP: ha_rollback_trans(6930586) rolled back: Deadlock found when trying to get lock; try restarting transaction; is_real 1
      2023-05-17 13:57:20 6930586 [Note] WSREP: SQL apply failed, res 149 conflict state: aborted
      2023-05-17 13:57:20 6930586 [ERROR] Slave SQL: Node has dropped from cluster, Gtid 0-8174-126467367555, Internal MariaDB error code: 1047
      

      Attachments

        1. master1_n1.cnf
          1 kB
        2. master1_n2.cnf
          1 kB
        3. master2_n1.cnf
          1 kB
        4. master2_n2.cnf
          1 kB
        5. transactions.yy
          4 kB
        6. transactions.zz
          1.0 kB

        Issue Links

          Activity

            seppo Seppo Jaakola added a comment -

            It looks that the error returned from optimistic async replication applying conflicts is treated as galera cluster failure. The failure should instead be returned to optimistic replication control, where retrying should be handled. I will prepare a pull request for refactoring this failure handling.

            seppo Seppo Jaakola added a comment - It looks that the error returned from optimistic async replication applying conflicts is treated as galera cluster failure. The failure should instead be returned to optimistic replication control, where retrying should be handled. I will prepare a pull request for refactoring this failure handling.
            janlindstrom Jan Lindström added a comment - https://github.com/MariaDB/server/pull/2721
            sysprg Julius Goryavsky added a comment - Fixed, https://github.com/MariaDB/server/commit/a3cbc44b24ec467f33e445f57e2022e038b88623

            People

              sysprg Julius Goryavsky
              rpizzi Rick Pizzi (Inactive)
              Votes:
              7 Vote for this issue
              Watchers:
              15 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.