diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 32f0a000966..b4b82473d97 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -2,3 +2,5 @@ /docker/ @derekperkins @dkhenry /helm/ @derekperkins @dkhenry +/config/mycnf/ @morgo +/go/vt/mysqlctl/mysqld.go @morgo diff --git a/config/mycnf/default-fast.cnf b/config/mycnf/default-fast.cnf index 969b51baa34..e3d852fcfc0 100644 --- a/config/mycnf/default-fast.cnf +++ b/config/mycnf/default-fast.cnf @@ -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 diff --git a/config/mycnf/default.cnf b/config/mycnf/default.cnf index 61f767a8032..b8af15801b0 100644 --- a/config/mycnf/default.cnf +++ b/config/mycnf/default.cnf @@ -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 + + diff --git a/config/mycnf/master.cnf b/config/mycnf/master.cnf deleted file mode 100644 index 481f06f5ffd..00000000000 --- a/config/mycnf/master.cnf +++ /dev/null @@ -1,5 +0,0 @@ -# master.cnf parameters - -log-bin = {{.BinLogPath}} -log-slave-updates -sync_binlog = 1 diff --git a/config/mycnf/master_mariadb100.cnf b/config/mycnf/master_mariadb100.cnf index 3eed4d8ea5f..544681d601d 100644 --- a/config/mycnf/master_mariadb100.cnf +++ b/config/mycnf/master_mariadb100.cnf @@ -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. @@ -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 @@ -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 + diff --git a/config/mycnf/master_mariadb101.cnf b/config/mycnf/master_mariadb101.cnf index 8c5b9e47fac..01567b4d960 100644 --- a/config/mycnf/master_mariadb101.cnf +++ b/config/mycnf/master_mariadb101.cnf @@ -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. @@ -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 @@ -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 diff --git a/config/mycnf/master_mariadb102.cnf b/config/mycnf/master_mariadb102.cnf index 1ea39a2a47c..17d83cc3610 100644 --- a/config/mycnf/master_mariadb102.cnf +++ b/config/mycnf/master_mariadb102.cnf @@ -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. @@ -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 diff --git a/config/mycnf/master_mariadb103.cnf b/config/mycnf/master_mariadb103.cnf index ac8b38404fd..36eef4f2f50 100644 --- a/config/mycnf/master_mariadb103.cnf +++ b/config/mycnf/master_mariadb103.cnf @@ -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 + + diff --git a/config/mycnf/master_mariadb104.cnf b/config/mycnf/master_mariadb104.cnf index a144f352561..9444e8d67fa 100644 --- a/config/mycnf/master_mariadb104.cnf +++ b/config/mycnf/master_mariadb104.cnf @@ -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 + + diff --git a/config/mycnf/master_mysql56.cnf b/config/mycnf/master_mysql56.cnf index dcb8a4e113f..7524ef1663a 100644 --- a/config/mycnf/master_mysql56.cnf +++ b/config/mycnf/master_mysql56.cnf @@ -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 @@ -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 + diff --git a/config/mycnf/master_mysql57.cnf b/config/mycnf/master_mysql57.cnf index 381b05ac14c..82c4e36c5fb 100644 --- a/config/mycnf/master_mysql57.cnf +++ b/config/mycnf/master_mysql57.cnf @@ -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. diff --git a/config/mycnf/master_mysql80.cnf b/config/mycnf/master_mysql80.cnf index e92b794ef9b..6c3d77d5135 100644 --- a/config/mycnf/master_mysql80.cnf +++ b/config/mycnf/master_mysql80.cnf @@ -1,20 +1,18 @@ # This file is auto-included when MySQL 8.0 is detected. -# Options for enabling GTID -# https://dev.mysql.com/doc/refman/5.6/en/replication-gtids-howto.html +# 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 -log_bin -log_slave_updates enforce_gtid_consistency - -# Crash-safe replication settings. -master_info_repository = TABLE -relay_log_info_repository = TABLE -relay_log_purge = 1 relay_log_recovery = 1 +binlog_expire_logs_seconds = 259200 + +# disable mysqlx +mysqlx = 0 -# Native AIO tends to run into aio-max-nr limit during test startup. -innodb_use_native_aio = 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 master goes away). Here we just load the plugin so it's @@ -25,16 +23,9 @@ innodb_use_native_aio = 0 # promoted or demoted. 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 - -# disable mysqlx -mysqlx = 0 +# MySQL 8.0 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_master_timeout = 1000000000000000000 +loose_rpl_semi_sync_master_wait_no_slave = 1 -# 8.0 changes the default auth-plugin to caching_sha2_password -default_authentication_plugin = mysql_native_password -secure_file_priv = NULL diff --git a/config/mycnf/rbr.cnf b/config/mycnf/rbr.cnf index 5dde64cda57..10c17a6f09c 100644 --- a/config/mycnf/rbr.cnf +++ b/config/mycnf/rbr.cnf @@ -1 +1,3 @@ -binlog-format=row +# This file is used to allow legacy tests to pass +# In theory it should not be required +binlog_format=row diff --git a/config/mycnf/replica.cnf b/config/mycnf/replica.cnf deleted file mode 100644 index 74e9f2b34ea..00000000000 --- a/config/mycnf/replica.cnf +++ /dev/null @@ -1,13 +0,0 @@ -# replica.cnf - reserved for future tuning - -relay-log = {{.RelayLogPath}} -relay-log-index = {{.RelayLogIndexPath}} -relay-log-info-file = {{.RelayLogInfoPath}} -master-info-file = {{.MasterInfoFile}} - -# required if this master is chained -# probably safe to turn on all the time at the expense of some disk I/O -# note: this is in the master conf too -log-slave-updates - -#slave_compressed_protocol diff --git a/config/mycnf/vtcombo.cnf b/config/mycnf/vtcombo.cnf deleted file mode 100644 index de6141f2c97..00000000000 --- a/config/mycnf/vtcombo.cnf +++ /dev/null @@ -1 +0,0 @@ -max_connections = 5000 diff --git a/examples/compose/README.md b/examples/compose/README.md index 12f81422d64..0efd2dcd6aa 100644 --- a/examples/compose/README.md +++ b/examples/compose/README.md @@ -157,7 +157,6 @@ DB_CHARSET=CHARACTER SET utf8 COLLATE utf8_general_ci Ensure you have log bin enabled on your external database. You may add the following configs to your conf.d directory and reload mysqld on your server ``` -vitess/config/mycnf/master_mysql56.cnf vitess/config/mycnf/rbr.cnf ``` @@ -263,4 +262,4 @@ vitess/examples/compose$ ./lvtctl.sh ApplyVschema -vschema '{"sharded":false, "t ``` This has since been fixed by -https://github.com/vitessio/vitess/pull/4868 & https://github.com/vitessio/vitess/pull/5010 \ No newline at end of file +https://github.com/vitessio/vitess/pull/4868 & https://github.com/vitessio/vitess/pull/5010 diff --git a/examples/compose/external_db/docker-compose.yml b/examples/compose/external_db/docker-compose.yml index 5b3b28f1f9e..b0b1e58f9fd 100644 --- a/examples/compose/external_db/docker-compose.yml +++ b/examples/compose/external_db/docker-compose.yml @@ -17,7 +17,6 @@ services: volumes: - vol-db:/var/lib/mysql - ./mysql/:/docker-entrypoint-initdb.d/ - - ./mysql/master_mysql56.cnf:/etc/mysql/conf.d/master_mysql56.cnf - ./mysql/query.log:/var/log/mysql/query.log - ./mysql/slow.log:/var/log/mysql/slow.log healthcheck: diff --git a/examples/compose/vttablet-up.sh b/examples/compose/vttablet-up.sh index 00369ecdd22..3df619ce20a 100755 --- a/examples/compose/vttablet-up.sh +++ b/examples/compose/vttablet-up.sh @@ -70,7 +70,6 @@ if [ $tablet_role != "master" ]; then fi # Enforce Row Based Replication export EXTRA_MY_CNF=$VTROOT/config/mycnf/default-fast.cnf:$VTROOT/config/mycnf/rbr.cnf -export EXTRA_MY_CNF=$EXTRA_MY_CNF:$VTROOT/config/mycnf/master_mysql56.cnf mkdir -p $VTDATAROOT/backups @@ -182,4 +181,4 @@ exec $VTROOT/bin/vttablet \ -backup_storage_implementation file \ -file_backup_storage_root $VTDATAROOT/backups \ -queryserver-config-schema-reload-time 60 \ - $external_db_args \ No newline at end of file + $external_db_args diff --git a/examples/kubernetes/vttablet-pod-benchmarking-template.yaml b/examples/kubernetes/vttablet-pod-benchmarking-template.yaml index 8f24da64f54..f1cc59e7101 100644 --- a/examples/kubernetes/vttablet-pod-benchmarking-template.yaml +++ b/examples/kubernetes/vttablet-pod-benchmarking-template.yaml @@ -87,9 +87,6 @@ spec: -tablet_uid {{uid}} -socket_file $VTDATAROOT/mysqlctl.sock -init_db_sql_file $VTROOT/config/init_db.sql" vitess - env: - - name: EXTRA_MY_CNF - value: /vt/config/mycnf/benchmark.cnf:/vt/config/mycnf/master_mysql56.cnf volumes: - name: syslog hostPath: {path: /dev/log} diff --git a/examples/kubernetes/vttablet-pod-template.yaml b/examples/kubernetes/vttablet-pod-template.yaml index 52e19aad80f..6be80409cae 100644 --- a/examples/kubernetes/vttablet-pod-template.yaml +++ b/examples/kubernetes/vttablet-pod-template.yaml @@ -69,9 +69,6 @@ spec: -orc_api_url http://orchestrator/api -orc_discover_interval 5m -restore_from_backup {{backup_flags}}" vitess - env: - - name: EXTRA_MY_CNF - value: /vt/config/mycnf/master_mysql56.cnf - name: mysql image: {{vitess_image}} volumeMounts: @@ -96,9 +93,6 @@ spec: -tablet_uid {{uid}} -socket_file $VTDATAROOT/mysqlctl.sock -init_db_sql_file $VTROOT/config/init_db.sql" vitess - env: - - name: EXTRA_MY_CNF - value: /vt/config/mycnf/master_mysql56.cnf volumes: - name: syslog hostPath: {path: /dev/log} diff --git a/go/vt/mysqlctl/mycnf_test.go b/go/vt/mysqlctl/mycnf_test.go index e7215f894fe..c8381a46af3 100644 --- a/go/vt/mysqlctl/mycnf_test.go +++ b/go/vt/mysqlctl/mycnf_test.go @@ -43,8 +43,6 @@ func TestMycnf(t *testing.T) { } cnfTemplatePaths := []string{ path.Join(root, "src/vitess.io/vitess/config/mycnf/default.cnf"), - path.Join(root, "src/vitess.io/vitess/config/mycnf/replica.cnf"), - path.Join(root, "src/vitess.io/vitess/config/mycnf/master.cnf"), } data, err := cnf.makeMycnf(cnfTemplatePaths) if err != nil { diff --git a/go/vt/mysqlctl/mysqld.go b/go/vt/mysqlctl/mysqld.go index 84c000306c2..c5dc48a4b80 100644 --- a/go/vt/mysqlctl/mysqld.go +++ b/go/vt/mysqlctl/mysqld.go @@ -798,8 +798,6 @@ func (mysqld *Mysqld) getMycnfTemplates(root string) []string { cnfTemplatePaths := []string{ path.Join(root, "config/mycnf/default.cnf"), - path.Join(root, "config/mycnf/master.cnf"), - path.Join(root, "config/mycnf/replica.cnf"), } if extraCnf := os.Getenv("EXTRA_MY_CNF"); extraCnf != "" { diff --git a/go/vt/vttest/environment.go b/go/vt/vttest/environment.go index 336e92c3b06..551cc4e1d9b 100644 --- a/go/vt/vttest/environment.go +++ b/go/vt/vttest/environment.go @@ -115,23 +115,8 @@ func GetMySQLOptions(flavor string) (string, []string, error) { flavor = DefaultMySQLFlavor } - mycnf := []string{"config/mycnf/vtcombo.cnf"} - switch flavor { - case "MariaDB103": - mycnf = append(mycnf, "config/mycnf/default-fast.cnf") - mycnf = append(mycnf, "config/mycnf/master_mariadb103.cnf") - case "MariaDB": - mycnf = append(mycnf, "config/mycnf/default-fast.cnf") - mycnf = append(mycnf, "config/mycnf/master_mariadb100.cnf") - case "MySQL80": - mycnf = append(mycnf, "config/mycnf/default-fast.cnf") - mycnf = append(mycnf, "config/mycnf/master_mysql80.cnf") - case "MySQL56": - mycnf = append(mycnf, "config/mycnf/default-fast.cnf") - mycnf = append(mycnf, "config/mycnf/master_mysql56.cnf") - default: - return "", nil, fmt.Errorf("unknown mysql flavor: %s", flavor) - } + mycnf := []string{} + mycnf = append(mycnf, "config/mycnf/default-fast.cnf") for i, cnf := range mycnf { mycnf[i] = path.Join(os.Getenv("VTTOP"), cnf) diff --git a/helm/vitess/README.md b/helm/vitess/README.md index 8e884b60117..5ff807a552d 100644 --- a/helm/vitess/README.md +++ b/helm/vitess/README.md @@ -392,7 +392,7 @@ metadata: data: extra.cnf: |- early-plugin-load=keyring_vault=keyring_vault.so - # this includes default rpl plugins, see https://github.com/vitessio/vitess/blob/master/config/mycnf/master_mysql56.cnf for details + # this includes default rpl plugins, see https://github.com/vitessio/vitess/blob/master/config/mycnf/master_mysql57.cnf for details plugin-load=rpl_semi_sync_master=semisync_master.so;rpl_semi_sync_slave=semisync_slave.so;keyring_udf=keyring_udf.so keyring_vault_config=/vt/usersecrets/vttablet-vault/vault.conf # load keyring configuration from secret innodb_encrypt_tables=ON # encrypt all tables by default diff --git a/py/vttest/mysql_flavor.py b/py/vttest/mysql_flavor.py index 26e8aaf3d49..3da1570e05d 100644 --- a/py/vttest/mysql_flavor.py +++ b/py/vttest/mysql_flavor.py @@ -49,7 +49,6 @@ class MariaDB(MysqlFlavor): def my_cnf(self): files = [ os.path.join(vttop, "config/mycnf/default-fast.cnf"), - os.path.join(vttop, "config/mycnf/master_mariadb100.cnf"), ] return ":".join(files) @@ -59,7 +58,6 @@ class MariaDB103(MysqlFlavor): def my_cnf(self): files = [ os.path.join(vttop, "config/mycnf/default-fast.cnf"), - os.path.join(vttop, "config/mycnf/master_mariadb103.cnf"), ] return ":".join(files) @@ -69,7 +67,6 @@ class MySQL56(MysqlFlavor): def my_cnf(self): files = [ os.path.join(vttop, "config/mycnf/default-fast.cnf"), - os.path.join(vttop, "config/mycnf/master_mysql56.cnf"), ] return ":".join(files) @@ -79,7 +76,6 @@ class MySQL80(MysqlFlavor): def my_cnf(self): files = [ os.path.join(vttop, "config/mycnf/default-fast.cnf"), - os.path.join(vttop, "config/mycnf/master_mysql80.cnf"), ] return ":".join(files) diff --git a/py/vttest/run_local_database.py b/py/vttest/run_local_database.py index 8301a4e2b42..d25205e66b3 100755 --- a/py/vttest/run_local_database.py +++ b/py/vttest/run_local_database.py @@ -98,7 +98,7 @@ def main(cmdline_options): init_data_opts.max_table_shard_size = cmdline_options.max_table_shard_size init_data_opts.null_probability = cmdline_options.null_probability - extra_my_cnf = os.path.join(os.environ['VTTOP'], 'config/mycnf/vtcombo.cnf') + extra_my_cnf = '' if cmdline_options.extra_my_cnf: extra_my_cnf += ':' + cmdline_options.extra_my_cnf diff --git a/test/config.json b/test/config.json index 603e772de11..9523cbed562 100644 --- a/test/config.json +++ b/test/config.json @@ -590,7 +590,7 @@ "Args": [], "Command": [], "Manual": false, - "Shard": 2, + "Shard": 5, "RetryMax": 0, "Tags": [ "worker_test" diff --git a/test/mysql_flavor.py b/test/mysql_flavor.py index 9cf057982ea..8102ad0cfd1 100644 --- a/test/mysql_flavor.py +++ b/test/mysql_flavor.py @@ -126,7 +126,7 @@ def reset_replication_commands(self): ] def extra_my_cnf(self): - return environment.vttop + "/config/mycnf/master_mariadb100.cnf" + return "" def master_position(self, tablet): gtid = tablet.mquery("", "SELECT @@GLOBAL.gtid_binlog_pos")[0][0] @@ -152,7 +152,7 @@ class MariaDB103(MariaDB): """Overrides specific to MariaDB 10.3+.""" def extra_my_cnf(self): - return environment.vttop + "/config/mycnf/master_mariadb103.cnf" + return "" class MySQL56(MysqlFlavor): """Overrides specific to MySQL 5.6/5.7""" @@ -172,7 +172,7 @@ def position_at_least(self, a, b): ]).strip() == "true" def extra_my_cnf(self): - return environment.vttop + "/config/mycnf/master_mysql56.cnf" + return "" def change_master_commands(self, host, port, pos): gtid = pos.split("/")[1] @@ -186,7 +186,7 @@ def change_master_commands(self, host, port, pos): class MySQL80(MySQL56): """Overrides specific to MySQL 8.0.""" def extra_my_cnf(self): - return environment.vttop + "/config/mycnf/master_mysql80.cnf" + return "" def change_passwords(self, password_col): """set real passwords for all users""" return '''