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

Semi-Sync Ack_Receiver Thread Should Allow COM_QUIT Command

    XMLWordPrintable

Details

    Description

      The semi-sync protocol between a replica and primary is implemented such that all ACK packets from the replica set a "magic" bit at the start of the packet. The primary's Ack_Receiver thread has a check to ensure that all packets sent from the replica have this bit set (if semi-sync is active), and if not, an error is indicated. When a semi-sync replica stops its connection with the primary (either by STOP SLAVE or in error), it cannot use the API mysql_close() function, because it automatically sends a COM_QUIT command on the connection, which does not conform to the semi-sync protocol. To get around this, the replica will create a new non-semi-sync connection with the primary, and issue a KILL command to outwardly kill the semi-sync connection.

      However, if a third party sits in-between this connection as a proxy, and sends a COM_QUIT to sever the connection, the primary will report the error. To accommodate this set-up, the primary's Ack_Receiver thread should allow for an exception to the protocol if the packet is a COM_QUIT command.

      Attachments

        Issue Links

          Activity

            People

              bnestere Brandon Nesterenko
              bnestere Brandon Nesterenko
              Votes:
              1 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.