-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to use semisync source / replica plugins
The plugins with the old terminology are deprecated and will be removed in the future. In MySQL 8.4.0 also the old terminology for regular replication is removed. This starts the move to use the new style. Since MySQL 8.0.26 the new semisync plugin is available, so we should start using it from that version on. This means we also need new default MySQL cnf files to set up things correctly. We add here a mysql8026.cnf and also a pre-emptive mysql84.cnf. The latter is needed to start the work in the future for MySQL 8.4.0. The main change here is that the deprecated mysql_native_password plugin needs to be explicitly enabled. Removing our usage of mysql_native_password is another separate significant effort. The main issue there is how we want to deal with certificates etc. which end up being required for replication if you want to use caching_sha2_password which adds a whole layer of complexity we've never had to deal with. Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
- Loading branch information
Showing
46 changed files
with
668 additions
and
293 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# This file is auto-included when MySQL 8.0.26 or later is detected. | ||
|
||
# MySQL 8.0 enables binlog by default with sync_binlog and TABLE info repositories | ||
# It does not enable GTIDs or enforced GTID consistency | ||
|
||
gtid_mode = ON | ||
enforce_gtid_consistency | ||
relay_log_recovery = 1 | ||
binlog_expire_logs_seconds = 259200 | ||
|
||
# disable mysqlx | ||
mysqlx = 0 | ||
|
||
# 8.0 changes the default auth-plugin to caching_sha2_password | ||
default_authentication_plugin = mysql_native_password | ||
|
||
# Semi-sync replication is required for automated unplanned failover | ||
# (when the primary goes away). Here we just load the plugin so it's | ||
# available if desired, but it's disabled at startup. | ||
# | ||
# VTTablet will enable semi-sync at the proper time when replication is set up, | ||
# or when a primary is promoted or demoted based on the durability policy configured. | ||
plugin-load = rpl_semi_sync_source=semisync_source.so;rpl_semi_sync_replica=semisync_replica.so | ||
|
||
# MySQL 8.0.26 and later will not load plugins during --initialize | ||
# which makes these options unknown. Prefixing with --loose | ||
# tells the server it's fine if they are not understood. | ||
loose_rpl_semi_sync_source_timeout = 1000000000000000000 | ||
loose_rpl_semi_sync_source_wait_no_replica = 1 | ||
|
||
# In order to protect against any errand GTIDs we will start the mysql instance | ||
# in super-read-only mode. | ||
super-read-only | ||
|
||
# Replication parameters to ensure reparents are fast. | ||
replica_net_timeout = 8 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# This file is auto-included when MySQL 8.4.0 or later is detected. | ||
|
||
# MySQL 8.0 enables binlog by default with sync_binlog and TABLE info repositories | ||
# It does not enable GTIDs or enforced GTID consistency | ||
|
||
gtid_mode = ON | ||
enforce_gtid_consistency | ||
relay_log_recovery = 1 | ||
binlog_expire_logs_seconds = 259200 | ||
|
||
# disable mysqlx | ||
mysqlx = 0 | ||
|
||
# 8.4 changes the default auth-plugin to caching_sha2_password and | ||
# disables mysql_native_password by default. | ||
mysql_native_password = ON | ||
default_authentication_plugin = mysql_native_password | ||
|
||
# Semi-sync replication is required for automated unplanned failover | ||
# (when the primary goes away). Here we just load the plugin so it's | ||
# available if desired, but it's disabled at startup. | ||
# | ||
# VTTablet will enable semi-sync at the proper time when replication is set up, | ||
# or when a primary is promoted or demoted based on the durability policy configured. | ||
plugin-load = rpl_semi_sync_source=semisync_source.so;rpl_semi_sync_replica=semisync_replica.so | ||
|
||
# MySQL 8.0.26 and later will not load plugins during --initialize | ||
# which makes these options unknown. Prefixing with --loose | ||
# tells the server it's fine if they are not understood. | ||
loose_rpl_semi_sync_source_timeout = 1000000000000000000 | ||
loose_rpl_semi_sync_source_wait_no_replica = 1 | ||
|
||
# In order to protect against any errand GTIDs we will start the mysql instance | ||
# in super-read-only mode. | ||
super-read-only | ||
|
||
# Replication parameters to ensure reparents are fast. | ||
replica_net_timeout = 8 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.