[MDEV-17867] Make RESET MASTER throw GTID-related warning if gtid_slave_pos is set Created: 2018-11-28  Updated: 2020-06-11

Status: Open
Project: MariaDB Server
Component/s: Admin statements, Replication
Fix Version/s: None

Type: Task Priority: Major
Reporter: Geoff Montee (Inactive) Assignee: Andrei Elkin
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-17156 Local transactions on a Slave don't u... Closed
relates to MDEV-17368 RESET MASTER doesn't completely reset... Closed
relates to MDEV-17369 Document how to reset gtid_current_pos Closed
relates to MDEV-17853 Document that gtid_binlog_pos can lag... Closed

 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 = ''"



 Comments   
Comment by Andrei Elkin [ 2020-06-11 ]

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.

Comment by Geoff Montee (Inactive) [ 2020-06-11 ]

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.

Comment by Andrei Elkin [ 2020-06-11 ]

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!

Generated at Thu Feb 08 08:39:42 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.