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

            rpizzi Rick Pizzi (Inactive) created issue -
            julien.fritsch Julien Fritsch made changes -
            Field Original Value New Value
            Fix Version/s 10.4 [ 23604 ]
            Fix Version/s 10.5 [ 23608 ]
            Fix Version/s 10.6 [ 24027 ]
            ricardo.galvan Ricardo Galvan made changes -
            Labels triage
            julien.fritsch Julien Fritsch made changes -
            Fix Version/s 10.4 [ 23604 ]
            Fix Version/s 10.6 [ 24027 ]
            julien.fritsch Julien Fritsch made changes -
            Assignee Ramesh Sivaraman [ JIRAUSER48189 ]
            ramesh Ramesh Sivaraman made changes -
            Attachment transactions.zz [ 70252 ]
            Attachment transactions.yy [ 70253 ]
            Attachment master2_n2.cnf [ 70254 ]
            Attachment master2_n1.cnf [ 70255 ]
            Attachment master1_n2.cnf [ 70256 ]
            Attachment master1_n1.cnf [ 70257 ]
            ramesh Ramesh Sivaraman made changes -
            Assignee Ramesh Sivaraman [ JIRAUSER48189 ] Julius Goryavsky [ sysprg ]
            ramesh Ramesh Sivaraman made changes -
            Status Open [ 1 ] Confirmed [ 10101 ]
            sysprg Julius Goryavsky made changes -
            Status Confirmed [ 10101 ] In Progress [ 3 ]
            sysprg Julius Goryavsky made changes -
            sysprg Julius Goryavsky made changes -
            Assignee Julius Goryavsky [ sysprg ] Seppo Jaakola [ seppo ]
            julien.fritsch Julien Fritsch made changes -
            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.
            julien.fritsch Julien Fritsch made changes -
            Component/s Galera [ 10124 ]
            Component/s Replication [ 10100 ]
            Component/s Galera [ 14918 ]
            Component/s Replication [ 14976 ]
            Fix Version/s 10.5 [ 23123 ]
            Fix Version/s 10.5 [ 23608 ]
            Key MENT-1815 MDEV-31833
            Affects Version/s 10.5.19-14 [ 28546 ]
            Project MariaDB Enterprise [ 11500 ] MariaDB Server [ 10000 ]
            seppo Seppo Jaakola made changes -
            Status In Progress [ 3 ] Stalled [ 10000 ]
            seppo Seppo Jaakola made changes -
            Status Stalled [ 10000 ] In Testing [ 10301 ]
            seppo Seppo Jaakola made changes -
            Status In Testing [ 10301 ] Stalled [ 10000 ]
            seppo Seppo Jaakola made changes -
            Status Stalled [ 10000 ] In Review [ 10002 ]
            janlindstrom Jan Lindström added a comment - https://github.com/MariaDB/server/pull/2721
            ralf.gebhardt Ralf Gebhardt made changes -
            Assignee Seppo Jaakola [ seppo ] Julius Goryavsky [ sysprg ]
            sysprg Julius Goryavsky made changes -
            Status In Review [ 10002 ] Stalled [ 10000 ]
            sysprg Julius Goryavsky made changes -
            Status Stalled [ 10000 ] In Progress [ 3 ]
            sysprg Julius Goryavsky added a comment - Fixed, https://github.com/MariaDB/server/commit/a3cbc44b24ec467f33e445f57e2022e038b88623
            sysprg Julius Goryavsky made changes -
            issue.field.resolutiondate 2023-09-12 11:46:43.0 2023-09-12 11:46:43.464
            sysprg Julius Goryavsky made changes -
            Fix Version/s 10.5.23 [ 29012 ]
            Fix Version/s 10.6.16 [ 29014 ]
            Fix Version/s 10.10.7 [ 29018 ]
            Fix Version/s 10.11.6 [ 29020 ]
            Fix Version/s 11.0.4 [ 29021 ]
            Fix Version/s 11.1.3 [ 29023 ]
            Fix Version/s 11.2.2 [ 29035 ]
            Fix Version/s 11.3.0 [ 29302 ]
            Fix Version/s 10.5 [ 23123 ]
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Closed [ 6 ]
            julien.fritsch Julien Fritsch made changes -
            Fix Version/s 11.2.2 [ 29035 ]
            Fix Version/s 11.3.0 [ 29302 ]
            mariadb-jira-automation Jira Automation (IT) made changes -
            Zendesk Related Tickets 196297 201692 185636
            Zendesk active tickets 201692

            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.