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

status variable Slave_running show off in slave with more than one master

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 10.0.4
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      centos 6.4

      Description

      Configure a maria slave with 2 masters each replicating a different database.

      The status variable slave_running show "OFF" . Both sql and io thread status is fine in both the slave connections.

      MariaDB [(none)]> show global status like 'slave_running';
      +---------------+-------+
      | Variable_name | Value |
      +---------------+-------+
      | Slave_running | OFF   |
      +---------------+-------+
      1 row in set (0.00 sec)
      

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            elenst Elena Stepanova added a comment -

            The current logic is such that the Slave_running status variable indicates the status of the default slave (the one that default_status_connection variable is set to). The default value of default_status_connection is an empty line, which relates to the unnamed slave configured by the legacy syntax, when you just say
            CHANGE MASTER TO ...
            without specifying the name.
            If both your master/slave connections are named, that is, if you configured them as
            CHANGE MASTER 'name1' TO ... ;
            CHANGE MASTER 'name2' TO ... ;
            and then started them, it means that 'name1' slave is running, 'name2' slave is running, but '' slave is not, which is what Slave_running variable shows.
            If you run
            SET default_master_connection = 'name1';
            then Slave_running should start showing 'ON', assuming that 'name1' is running.

            I agree that the behavior is not obvious, and there were plans to sort out slave-related status and server variables. I'll assign it to Monty to decide what can be done about this one.

            Show
            elenst Elena Stepanova added a comment - The current logic is such that the Slave_running status variable indicates the status of the default slave (the one that default_status_connection variable is set to). The default value of default_status_connection is an empty line, which relates to the unnamed slave configured by the legacy syntax, when you just say CHANGE MASTER TO ... without specifying the name. If both your master/slave connections are named, that is, if you configured them as CHANGE MASTER 'name1' TO ... ; CHANGE MASTER 'name2' TO ... ; and then started them, it means that 'name1' slave is running, 'name2' slave is running, but '' slave is not, which is what Slave_running variable shows. If you run SET default_master_connection = 'name1'; then Slave_running should start showing 'ON', assuming that 'name1' is running. I agree that the behavior is not obvious, and there were plans to sort out slave-related status and server variables. I'll assign it to Monty to decide what can be done about this one.

              People

              • Assignee:
                monty Michael Widenius
                Reporter:
                caravinth aravinth
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: