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

Seconds behind Master reports incorrect value when Parallel replication is used

    XMLWordPrintable

Details

    Description

      I am not sure how parallel replication impacts SBM calculation but the computation is obviously wrong when using parallel threads.
      SBM should be (imho) calculated by comparing the timestamp of the currently executed event in the binary log to the current datetime. I understand that there might be issues when executing events in parallel however that should work for most cases.

      simple reproducer: 
      <pre>
      #stop perfectly working slave
      STOP SLAVE;
      SELECT SLEEP(10);
      START SLAVE;
      SHOW PROCESSLIST\G
      MariaDB(db-02)[(none)]> SHOW PROCESSLIST\G
      *************************** 1. row ***************************
            Id: 3
          User: system user
          Host: 
            db: NULL
       Command: Connect
          Time: 10
         State: Waiting for work from SQL thread
          Info: NULL
      Progress: 0.000
      *************************** 2. row ***************************
            Id: 4
          User: system user
          Host: 
            db: NULL
       Command: Connect
          Time: 10
         State: Waiting for work from SQL thread
          Info: NULL
      Progress: 0.000
      *************************** 3. row ***************************
      SHOW SLAVE STATUS\G
       
              Seconds_Behind_Master: 0

      SBM first reports 0 then will increase monotonically from this point until it reaches the actual delay value (whatever is reported in "Time" for a worker thread in the processlist, for example).

      Attachments

        Issue Links

          Activity

            People

              knielsen Kristian Nielsen
              tanj Guillaume Lefranc
              Votes:
              3 Vote for this issue
              Watchers:
              9 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.