Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@

/docker/ @derekperkins @dkhenry
/helm/ @derekperkins @dkhenry
/config/mycnf/ @morgo
/go/vt/mysqlctl/mysqld.go @morgo
55 changes: 21 additions & 34 deletions config/mycnf/default-fast.cnf
Original file line number Diff line number Diff line change
@@ -1,37 +1,24 @@
# basic config parameters for all db instances in the grid
# This sets some unsafe settings specifically for
# the test-suite which is currently MySQL 5.7 based
# In future it should be renamed testsuite.cnf

sql_mode = STRICT_TRANS_TABLES
character_set_server = utf8
collation_server = utf8_general_ci
connect_timeout = 30
datadir = {{.DataDir}}
expire_logs_days = 3
innodb_buffer_pool_size = 64M
innodb_data_home_dir = {{.InnodbDataHomeDir}}
innodb_flush_log_at_trx_commit = 2
innodb_lock_wait_timeout = 20
innodb_buffer_pool_size = 32M
innodb_flush_log_at_trx_commit = 0
innodb_log_buffer_size = 1M
innodb_log_file_size = 4M
innodb_log_group_home_dir = {{.InnodbLogGroupHomeDir}}
innodb_log_file_size = 5M

# Native AIO tends to run into aio-max-nr limit during test startup.
innodb_use_native_aio = 0

key_buffer_size = 2M
log-error = {{.ErrorLogPath}}
long_query_time = 2
pid-file = {{.PidFile}}
port = {{.MysqlPort}}
# all db instances should start in read-only mode - once the db is started and
# fully functional, we'll push it into read-write mode
read-only
server-id = {{.ServerID}}
skip-name-resolve
# we now need networking for replication. this is a tombstone to simpler times.
#skip_networking
# all db instances should skip the slave startup - that way we can do any
# out-of-bounds checking before we restart everything - in case we need to do
# some extra work to skip mangled transactions or fudge the slave start
skip_slave_start
slave_net_timeout = 60
slave_load_tmpdir = {{.SlaveLoadTmpDir}}
slow-query-log
slow-query-log-file = {{.SlowLogPath}}
socket = {{.SocketFile}}
tmpdir = {{.TmpDir}}
sync_binlog=0
innodb_doublewrite=0

# These two settings are required for the testsuite to pass,
# but enabling them does not spark joy. They should be removed
# in the future. See:
# https://github.com/vitessio/vitess/issues/5395
# https://github.com/vitessio/vitess/issues/5396

binlog-format=statement
sql_mode = STRICT_TRANS_TABLES
34 changes: 17 additions & 17 deletions config/mycnf/default.cnf
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
# basic config parameters for all db instances in the grid
# Global configuration that is auto-included for all MySQL/MariaDB versions

sql_mode = STRICT_TRANS_TABLES
binlog_format = statement
character_set_server = utf8
collation_server = utf8_general_ci
connect_timeout = 30
datadir = {{.DataDir}}
expire_logs_days = 3
innodb_buffer_pool_size = 32M
innodb_data_home_dir = {{.InnodbDataHomeDir}}
innodb_flush_log_at_trx_commit = 2
innodb_lock_wait_timeout = 20
innodb_log_group_home_dir = {{.InnodbLogGroupHomeDir}}
log-error = {{.ErrorLogPath}}
long_query_time = 2
max_allowed_packet = 64M
max_connections = 500
pid-file = {{.PidFile}}
port = {{.MysqlPort}}

# all db instances should start in read-only mode - once the db is started and
# fully functional, we'll push it into read-write mode
read-only
server-id = {{.ServerID}}
skip-name-resolve

# all db instances should skip the slave startup - that way we can do any
# additional configuration (like enabling semi-sync) before we connect to
# the master.
skip_slave_start
slave_net_timeout = 60
slave_load_tmpdir = {{.SlaveLoadTmpDir}}
slow-query-log
slow-query-log-file = {{.SlowLogPath}}
socket = {{.SocketFile}}
tmpdir = {{.TmpDir}}

slow-query-log-file = {{.SlowLogPath}}

# These are sensible defaults that apply to all MySQL/MariaDB versions

long_query_time = 2
slow-query-log
skip-name-resolve
connect_timeout = 30
innodb_lock_wait_timeout = 20
max_allowed_packet = 64M
max_connections = 500


5 changes: 0 additions & 5 deletions config/mycnf/master.cnf

This file was deleted.

25 changes: 23 additions & 2 deletions config/mycnf/master_mariadb100.cnf
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# This file is auto-included when MariaDB 10.0 is detected.

innodb_support_xa = 0

# Semi-sync replication is required for automated unplanned failover
# (when the master goes away). Here we just load the plugin so it's
# available if desired, but it's disabled at startup.
Expand All @@ -11,6 +9,11 @@ innodb_support_xa = 0
# promoted or demoted.
plugin-load = rpl_semi_sync_master=semisync_master.so;rpl_semi_sync_slave=semisync_slave.so

slave_net_timeout = 60

# MariaDB 10.0 is unstrict by default
sql_mode = STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION

# enable strict mode so it's safe to compare sequence numbers across different server IDs.
gtid_strict_mode = 1
innodb_stats_persistent = 0
Expand All @@ -21,3 +24,21 @@ innodb_stats_persistent = 0
# a master that becomes unresponsive.
rpl_semi_sync_master_timeout = 1000000000000000000
rpl_semi_sync_master_wait_no_slave = 1


character_set_server = utf8
collation_server = utf8_general_ci

expire_logs_days = 3

log_bin
sync_binlog = 1
binlog_format = ROW
log_slave_updates
expire_logs_days = 3

# In MariaDB the default charset is latin1

character_set_server = utf8
collation_server = utf8_general_ci

24 changes: 22 additions & 2 deletions config/mycnf/master_mariadb101.cnf
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# This file is auto-included when MariaDB 10.1 is detected.

innodb_support_xa = 0

# Semi-sync replication is required for automated unplanned failover
# (when the master goes away). Here we just load the plugin so it's
# available if desired, but it's disabled at startup.
Expand All @@ -11,6 +9,11 @@ innodb_support_xa = 0
# promoted or demoted.
plugin-load = rpl_semi_sync_master=semisync_master.so;rpl_semi_sync_slave=semisync_slave.so

slave_net_timeout = 60

# MariaDB 10.1 default is only no-engine-substitution and no-auto-create-user
sql_mode = STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION,NO_AUTO_CREATE_USER

# enable strict mode so it's safe to compare sequence numbers across different server IDs.
gtid_strict_mode = 1
innodb_stats_persistent = 0
Expand All @@ -21,3 +24,20 @@ innodb_stats_persistent = 0
# a master that becomes unresponsive.
rpl_semi_sync_master_timeout = 1000000000000000000
rpl_semi_sync_master_wait_no_slave = 1


character_set_server = utf8
collation_server = utf8_general_ci

expire_logs_days = 3

log_bin
sync_binlog = 1
binlog_format = ROW
log_slave_updates
expire_logs_days = 3

# In MariaDB the default charset is latin1

character_set_server = utf8
collation_server = utf8_general_ci
19 changes: 17 additions & 2 deletions config/mycnf/master_mariadb102.cnf
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# This file is auto-included when MariaDB 10.2 is detected.

innodb_support_xa = 0

# Semi-sync replication is required for automated unplanned failover
# (when the master goes away). Here we just load the plugin so it's
# available if desired, but it's disabled at startup.
Expand All @@ -21,3 +19,20 @@ innodb_stats_persistent = 0
# a master that becomes unresponsive.
rpl_semi_sync_master_timeout = 1000000000000000000
rpl_semi_sync_master_wait_no_slave = 1


character_set_server = utf8
collation_server = utf8_general_ci

expire_logs_days = 3

log_bin
sync_binlog = 1
binlog_format = ROW
log_slave_updates
expire_logs_days = 3

# In MariaDB the default charset is latin1

character_set_server = utf8
collation_server = utf8_general_ci
30 changes: 19 additions & 11 deletions config/mycnf/master_mariadb103.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,28 @@
gtid_strict_mode = 1
innodb_stats_persistent = 0

# Semi-sync replication is required for automated unplanned failover
# (when the master goes away). Here we just load the plugin so it's
# available if desired, but it's disabled at startup.
#
# If the -enable_semi_sync flag is used, VTTablet will enable semi-sync
# at the proper time when replication is set up, or when masters are
# promoted or demoted.

# semi_sync has been merged into master as of mariadb 10.3 so this is no longer needed
#plugin-load = rpl_semi_sync_master=semisync_master.so;rpl_semi_sync_slave=semisync_slave.so

# When semi-sync is enabled, don't allow fallback to async
# if you get no ack, or have no slaves. This is necessary to
# prevent alternate futures when doing a failover in response to
# a master that becomes unresponsive.
rpl_semi_sync_master_timeout = 1000000000000000000
rpl_semi_sync_master_wait_no_slave = 1


character_set_server = utf8
collation_server = utf8_general_ci

expire_logs_days = 3

log_bin
sync_binlog = 1
binlog_format = ROW
log_slave_updates
expire_logs_days = 3

# In MariaDB the default charset is latin1

character_set_server = utf8
collation_server = utf8_general_ci


30 changes: 19 additions & 11 deletions config/mycnf/master_mariadb104.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,28 @@
gtid_strict_mode = 1
innodb_stats_persistent = 0

# Semi-sync replication is required for automated unplanned failover
# (when the master goes away). Here we just load the plugin so it's
# available if desired, but it's disabled at startup.
#
# If the -enable_semi_sync flag is used, VTTablet will enable semi-sync
# at the proper time when replication is set up, or when masters are
# promoted or demoted.

# semi_sync has been merged into master as of mariadb 10.3 so this is no longer needed
#plugin-load = rpl_semi_sync_master=semisync_master.so;rpl_semi_sync_slave=semisync_slave.so

# When semi-sync is enabled, don't allow fallback to async
# if you get no ack, or have no slaves. This is necessary to
# prevent alternate futures when doing a failover in response to
# a master that becomes unresponsive.
rpl_semi_sync_master_timeout = 1000000000000000000
rpl_semi_sync_master_wait_no_slave = 1


character_set_server = utf8
collation_server = utf8_general_ci

expire_logs_days = 3

log_bin
sync_binlog = 1
binlog_format = ROW
log_slave_updates
expire_logs_days = 3

# In MariaDB the default charset is latin1

character_set_server = utf8
collation_server = utf8_general_ci


24 changes: 17 additions & 7 deletions config/mycnf/master_mysql56.cnf
Original file line number Diff line number Diff line change
@@ -1,20 +1,29 @@
# This file is auto-included when MySQL 5.6 is detected.

# Options for enabling GTID
# https://dev.mysql.com/doc/refman/5.6/en/replication-gtids-howto.html
gtid_mode = ON
# MySQL 5.6 does not enable the binary log by default, and
# the default for sync_binlog is unsafe. The format is TABLE, and
# info repositories also default to file.

log_bin
sync_binlog = 1
gtid_mode = ON
binlog_format = ROW
log_slave_updates
enforce_gtid_consistency

# Crash-safe replication settings.
expire_logs_days = 3
master_info_repository = TABLE
relay_log_info_repository = TABLE
relay_log_purge = 1
relay_log_recovery = 1
slave_net_timeout = 60

# Native AIO tends to run into aio-max-nr limit during test startup.
innodb_use_native_aio = 0
# In MySQL 5.6 the default charset is latin1

character_set_server = utf8
collation_server = utf8_general_ci

# MySQL 5.6 is unstrict by default
sql_mode = STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION

# Semi-sync replication is required for automated unplanned failover
# (when the master goes away). Here we just load the plugin so it's
Expand All @@ -31,3 +40,4 @@ plugin-load = rpl_semi_sync_master=semisync_master.so;rpl_semi_sync_slave=semisy
# a master that becomes unresponsive.
rpl_semi_sync_master_timeout = 1000000000000000000
rpl_semi_sync_master_wait_no_slave = 1

14 changes: 9 additions & 5 deletions config/mycnf/master_mysql57.cnf
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
# This file is auto-included when MySQL 5.7 is detected.

# Options for enabling GTID
# https://dev.mysql.com/doc/refman/5.6/en/replication-gtids-howto.html
# MySQL 5.7 does not enable the binary log by default, and
# info repositories default to file

gtid_mode = ON
log_bin
log_slave_updates
enforce_gtid_consistency
innodb_use_native_aio = 0

# Crash-safe replication settings.
expire_logs_days = 3
master_info_repository = TABLE
relay_log_info_repository = TABLE
relay_log_purge = 1
relay_log_recovery = 1

# In MySQL 5.7 the default charset is latin1

character_set_server = utf8
collation_server = utf8_general_ci

# Semi-sync replication is required for automated unplanned failover
# (when the master goes away). Here we just load the plugin so it's
# available if desired, but it's disabled at startup.
Expand Down
Loading