[MDEV-32944] Rpl_semi_sync_slave_enabled sysvar Should Not Be Modifiable While IO Thread is Running Created: 2023-12-04  Updated: 2023-12-06  Resolved: 2023-12-06

Status: Closed
Project: MariaDB Server
Component/s: Replication
Affects Version/s: 10.6
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Brandon Nesterenko Assignee: Michael Widenius
Resolution: Won't Fix Votes: 0
Labels: MDEV-32551-test

Issue Links:
Problem/Incident
is caused by MDEV-32551 "Read semi-sync reply magic number er... Closed
Relates
relates to MDEV-32947 Semi-sync with Multi-source Checksum ... Open

 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)



 Comments   
Comment by Michael Widenius [ 2023-12-06 ]

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.

Generated at Thu Feb 08 10:35:12 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.