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

Rpl_semi_sync_slave_enabled sysvar Should Not Be Modifiable While IO Thread is Running

Details

    Description

      With the MDEV-32551 fixes, changing rpl_semi_sync_slave_enabled has no immediate effect if the IO thread is running, and will take effect only after restarting the slave. This seems confusing for users; and I think this system variable should only be allowed to be set if the IO thread isn't running, and report an error otherwise (e.g. as similarly done by the slave_parallel_threads variable in sys_vars.cc)

      Attachments

        Issue Links

          Activity

            I am looking at the old code and that allows one to modify it any time.
            Giving an error in 10.6 if a slave is running may not be a good idea as it may break things for users (unlikely but possible).
            The fact that one could disable semi-sync before for a running slave was a bug as the master is waiting for responses it will may get.

            There are other cases where we change defaults in MariaDB that only affects things later.

            • Changing global variables only affects new connections
            • Changing the default value for binary log format, it will only affect new queries, not old ones.

            I do not think we need to change things related to rpl_semi_sync_slave_enabled as we the variable will be default for the next connection.
            The current used value can be seen in @@rpl_semi_sync_slave_status.
            In multi-master one can have semi-sync enabled for some connection and not for others by changing rpl_semi_sync_slave_enabled when connecting to the master.
            In the future we should change things so that semi-sync should be a parameter for CHANGE MASTER so that one can have different semi-sync options for each connection.

            monty Michael Widenius added a comment - I am looking at the old code and that allows one to modify it any time. Giving an error in 10.6 if a slave is running may not be a good idea as it may break things for users (unlikely but possible). The fact that one could disable semi-sync before for a running slave was a bug as the master is waiting for responses it will may get. There are other cases where we change defaults in MariaDB that only affects things later. Changing global variables only affects new connections Changing the default value for binary log format, it will only affect new queries, not old ones. I do not think we need to change things related to rpl_semi_sync_slave_enabled as we the variable will be default for the next connection. The current used value can be seen in @@rpl_semi_sync_slave_status. In multi-master one can have semi-sync enabled for some connection and not for others by changing rpl_semi_sync_slave_enabled when connecting to the master. In the future we should change things so that semi-sync should be a parameter for CHANGE MASTER so that one can have different semi-sync options for each connection.

            People

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