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

Rpl_semi_sync_master_status is ON Without Any Connected Slaves

Details

    Description

      If a master has no connected slaves it will report its status as ON. which is inconsistent with the timeout behavior, as a transaction which has a semi-sync wait timeout will turn the status to OFF.

      It seems more logical that the semi-sync status should be OFF if there are no slaves to synchronize with.

      Attachments

        Issue Links

          Activity

            monty Michael Widenius added a comment - - edited

            MariaDB [test]> show status like "rpl_semi_sync_master_status";
            ----------------------------------+

            Variable_name Value

            ----------------------------------+

            Rpl_semi_sync_master_status OFF

            ----------------------------------+

            I also tried this diff:
            ++ b/mysql-test/suite/rpl/t/rpl_log_pos.test
            @@ -9,7 +9,10 @@

            1. Passes with rbr no problem, removed statement include [jbm]

            +show status like "rpl_semi_sync_master_status";
            +
            source include/master-slave.inc;
            +show status like "rpl_semi_sync_master_status";

            ------------------

            With this result:
            +++ /home/my/maria-10.6/mysql-test/suite/rpl/r/rpl_log_pos.reject 2023-12-06 16:00:38.129647143 +0200
            @@ -1,5 +1,11 @@
            +show status like "rpl_semi_sync_master_status";
            +Variable_name Value
            +Rpl_semi_sync_master_status OFF
            include/master-slave.inc
            [connection master]
            +show status like "rpl_semi_sync_master_status";
            +Variable_name Value
            +Rpl_semi_sync_master_status OFF

            However if if I first do:
            ariaDB [test]> set global rpl_semi_sync_master_enabled = ON;
            MariaDB [test]> show status like "rpl_semi_sync_master_status";
            ----------------------------------+

            Variable_name Value

            ----------------------------------+

            Rpl_semi_sync_master_status ON

            ----------------------------------+
            MariaDB [test]> create or replace table t1(a int) engine=innodb;
            MariaDB [test]> insert into t1 values (1);
            MariaDB [test]> commit;
            MariaDB [test]> show status like "rpl_semi_sync_master_status";
            ----------------------------------+

            Variable_name Value

            ----------------------------------+

            Rpl_semi_sync_master_status ON

            ----------------------------------+

            monty Michael Widenius added a comment - - edited MariaDB [test] > show status like "rpl_semi_sync_master_status"; ---------------------------- ------+ Variable_name Value ---------------------------- ------+ Rpl_semi_sync_master_status OFF ---------------------------- ------+ I also tried this diff: ++ b/mysql-test/suite/rpl/t/rpl_log_pos.test @@ -9,7 +9,10 @@ Passes with rbr no problem, removed statement include [jbm] +show status like "rpl_semi_sync_master_status"; + source include/master-slave.inc; +show status like "rpl_semi_sync_master_status"; ------------------ With this result: +++ /home/my/maria-10.6/mysql-test/suite/rpl/r/rpl_log_pos.reject 2023-12-06 16:00:38.129647143 +0200 @@ -1,5 +1,11 @@ +show status like "rpl_semi_sync_master_status"; +Variable_name Value +Rpl_semi_sync_master_status OFF include/master-slave.inc [connection master] +show status like "rpl_semi_sync_master_status"; +Variable_name Value +Rpl_semi_sync_master_status OFF However if if I first do: ariaDB [test] > set global rpl_semi_sync_master_enabled = ON; MariaDB [test] > show status like "rpl_semi_sync_master_status"; ---------------------------- ------+ Variable_name Value ---------------------------- ------+ Rpl_semi_sync_master_status ON ---------------------------- ------+ MariaDB [test] > create or replace table t1(a int) engine=innodb; MariaDB [test] > insert into t1 values (1); MariaDB [test] > commit; MariaDB [test] > show status like "rpl_semi_sync_master_status"; ---------------------------- ------+ Variable_name Value ---------------------------- ------+ Rpl_semi_sync_master_status ON ---------------------------- ------+

            monty my filing is about the second case, where if you first run

            set global rpl_semi_sync_master_enabled = ON;
            

            then rpl_semi_sync_master_status is still ON, even with no connected slaves (as you show).

            bnestere Brandon Nesterenko added a comment - monty my filing is about the second case, where if you first run set global rpl_semi_sync_master_enabled = ON; then rpl_semi_sync_master_status is still ON, even with no connected slaves (as you show).

            People

              monty Michael Widenius
              bnestere Brandon Nesterenko
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.