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

Make RESET MASTER throw GTID-related warning if gtid_slave_pos is set

Details

    Description

      RESET MASTER resets gtid_binlog_pos, but not gtid_slave_pos. This means that gtid_current_pos can still contain GTIDs after RESET MASTER. This can result in some confusing behavior. See MDEV-17156 and MDEV-17853.

      To try to make this more clear, what if RESET MASTER threw a warning if gtid_slave_pos was set? Maybe something like:

      RESET MASTER successfully reset gtid_binlog_pos, but gtid_slave_pos is non-empty. If you want to reset system's GTID state, then you must also manually reset gtid_slave_pos with "SET GLOBAL gtid_slave_pos = ''"
      

      Attachments

        Issue Links

          Activity

            Elkin Andrei Elkin added a comment - - edited

            GeoffMontee: To discuss with you, gtid_slave_pos represents the slave state, which may also be binlog-less.
            As to the effect on gtid_current_pos, I think we should go to deprecate gtid_current_pos instead as it made
            a nuisance of itself for so many times.

            Elkin Andrei Elkin added a comment - - edited GeoffMontee : To discuss with you, gtid_slave_pos represents the slave state, which may also be binlog-less. As to the effect on gtid_current_pos , I think we should go to deprecate gtid_current_pos instead as it made a nuisance of itself for so many times.

            Hi Elkin,

            As to the effect on gtid_current_pos, I think we should go to deprecate gtid_current_pos instead as it made a nuisance of itself for so many times.

            Why would you want to deprecate the gtid_current_pos system variable? In my opinion, it is useful. It tells you the complete GTID position of the node when both the local GTID position and the slave GTID position are combined. This is a very useful system variable.

            I understand why you would want to deprecate CHANGE MASTER TO ... MASTER_USE_GTID=current_pos. I have no issue with that. However, I think the gtid_current_pos system variable is useful, even if CHANGE MASTER TO ... MASTER_USE_GTID=current_pos is unsupported.

            GeoffMontee Geoff Montee (Inactive) added a comment - Hi Elkin , As to the effect on gtid_current_pos, I think we should go to deprecate gtid_current_pos instead as it made a nuisance of itself for so many times. Why would you want to deprecate the gtid_current_pos system variable? In my opinion, it is useful. It tells you the complete GTID position of the node when both the local GTID position and the slave GTID position are combined. This is a very useful system variable. I understand why you would want to deprecate CHANGE MASTER TO ... MASTER_USE_GTID=current_pos . I have no issue with that. However, I think the gtid_current_pos system variable is useful, even if CHANGE MASTER TO ... MASTER_USE_GTID=current_pos is unsupported.
            Elkin Andrei Elkin added a comment - - edited

            GeoffMontee Sorry, I indeed meant MASTER_USE_GTID=current_pos. You may know better about user satisfaction of
            @@global.gtid_current_pos. And its definition is consistent. Thank you for correcting me!

            Elkin Andrei Elkin added a comment - - edited GeoffMontee Sorry, I indeed meant MASTER_USE_GTID=current_pos . You may know better about user satisfaction of @@global.gtid_current_pos . And its definition is consistent. Thank you for correcting me!

            People

              Elkin Andrei Elkin
              GeoffMontee Geoff Montee (Inactive)
              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.