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

report slave progress to the master

    XMLWordPrintable

Details

    Description

      When using the semi-sync protocol, track each replica's progress. The SHOW REPLICA HOSTS output should be extended with two fields: one representing the GTID state last sent to the replica, and the other representing the GTID state last ACK'd from the replica.

      Additionally, treat rpl_semi_sync_master_timeout=0 as a special case where transactions do not await an ACK, but still report progress from the ack_thread on replica reply.

      When running SHOW REPLICA HOSTS instead of 4 columns

      SHOW REPLICA HOSTS;
      Server_id	Host	Port	Master_id
      

      we want to have additional columns

      Server_id  Host       Port    Master_id   Gtid_State_Sent   Gtid_State_Ack
      3          127.0.0.1  16002   1           0-1-5,1-2-10      0-1-4,1-2-7
      4          127.0.0.1  16003   1           0-1-5,1-2-10      0-1-2,1-2-3
      

      Additional notes:
      1. Replicas with semi-sync disabled should have empty values for Gtid_State_Ack.
      2. Updating a replica's Gtid_State_Ack should be done by the ack thread after validating that the transaction was sent to the replica
      3. The new columns should always be present, regardless of rpl_semi_sync_master_enabled, as the primary can disable semi-sync dynamically, and it could still be useful to display the information.
      4. Per design, when rpl_semi_sync_master_timeout=0, than rpl_semi_sync_master_status, if enabled earlier, should stay ON , instead of switching off to async and incrementing the counter updates.
      5. Per desing, in order to distinguish replica type between async, semi-sync stalled and semi-sync active replica, suggestion is to add new column Replica_type with replica type values depending on the state of replica.

      Attachments

        Issue Links

          Activity

            People

              bnestere Brandon Nesterenko
              anel Anel Husakovic
              Votes:
              1 Vote for this issue
              Watchers:
              15 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.