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

Add GTIDs_behind_master to Show-Slave-Status ..

Details

    • Task
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • Replication
    • None

    Description

      as an alternative or functional replacement to Seconds_behind_master.

      The request comes from salle of MariaDB support.

      Attachments

        Activity

          In my humble opinion a message like:

          "N transactions behind the master"

          is much better indicator than Seconds_behind_master.

          1000 seconds behind can mean single long running transaction whereas 15 seconds behind can mean 40 transactions behind. A DBA could be concerned more about slave lag of 40 transactions than about 1 transaction lag. This will also allow for better alerts by monitoring tools.

          salle Alexander Keremidarski added a comment - In my humble opinion a message like: "N transactions behind the master" is much better indicator than Seconds_behind_master. 1000 seconds behind can mean single long running transaction whereas 15 seconds behind can mean 40 transactions behind. A DBA could be concerned more about slave lag of 40 transactions than about 1 transaction lag. This will also allow for better alerts by monitoring tools.
          Elkin Andrei Elkin added a comment -

          bnestere, salle, as noted practically (thanks to pandi.gurusamy who pointed to that) we have had this feature in form of

          GTIDs_behind_master = ShowSlaveStatus::Gtid_IO_Pos - @@global.gtid_slave_pos
          

          I'd close the ticket.

          Elkin Andrei Elkin added a comment - bnestere , salle , as noted practically (thanks to pandi.gurusamy who pointed to that) we have had this feature in form of GTIDs_behind_master = ShowSlaveStatus::Gtid_IO_Pos - @@global.gtid_slave_pos I'd close the ticket.
          pandi.gurusamy Pandikrishnan Gurusamy added a comment - - edited

          The show slave status also has the ShowSlaveStatus::Gtid_Slave_Pos. May be we just need to introduce a new variable in SSS to compute the difference?

          pandi.gurusamy Pandikrishnan Gurusamy added a comment - - edited The show slave status also has the ShowSlaveStatus::Gtid_Slave_Pos . May be we just need to introduce a new variable in SSS to compute the difference?

          No, in the general case, you cannot just subtract the sequence numbers of GTIDs to know how many GTIDs are pending.

          knielsen Kristian Nielsen added a comment - No, in the general case, you cannot just subtract the sequence numbers of GTIDs to know how many GTIDs are pending.
          Elkin Andrei Elkin added a comment -

          Sure, but one can subtract in the gtid_strict_mode, which is always recommended.

          Elkin Andrei Elkin added a comment - Sure, but one can subtract in the gtid_strict_mode, which is always recommended.

          What about tracking the number of transactions/GTIDs that remain un-executed in the relay log (e.g. incremented when the IO thread queues a GTID event, and decremented when SQL thread/worker commit a trx)?

          bnestere Brandon Nesterenko added a comment - What about tracking the number of transactions/GTIDs that remain un-executed in the relay log (e.g. incremented when the IO thread queues a GTID event, and decremented when SQL thread/worker commit a trx)?

          People

            bnestere Brandon Nesterenko
            Elkin Andrei Elkin
            Votes:
            1 Vote for this issue
            Watchers:
            7 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.