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
6 changes: 3 additions & 3 deletions config/tablet/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ oltp:
healthcheck:
intervalSeconds: 20 # health-check-interval
degradedThresholdSeconds: 30 # degraded-threshold
unhealthyThresholdSeconds: 7200 # unhealthy_threshold
unhealthyThresholdSeconds: 7200 # unhealthy-threshold

gracePeriods:
shutdownSeconds: 0 # shutdown_grace_period
transitionSeconds: 0 # serving_state_grace_period
shutdownSeconds: 0 # shutdown-grace-period
transitionSeconds: 0 # serving-state-grace-period

replicationTracker:
mode: disable # enable-replication-reporter
Expand Down
4 changes: 2 additions & 2 deletions go/cmd/vtcombo/cli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ func init() {

acl.RegisterFlags(Main.Flags())

Main.Flags().StringVar(&schemaDir, "schema_dir", schemaDir, "Schema base directory. Should contain one directory per keyspace, with a vschema.json file if necessary.")
Main.Flags().BoolVar(&startMysql, "start_mysql", startMysql, "Should vtcombo also start mysql")
utils.SetFlagStringVar(Main.Flags(), &schemaDir, "schema-dir", schemaDir, "Schema base directory. Should contain one directory per keyspace, with a vschema.json file if necessary.")
utils.SetFlagBoolVar(Main.Flags(), &startMysql, "start-mysql", startMysql, "Should vtcombo also start mysql")
utils.SetFlagIntVar(Main.Flags(), &mysqlPort, "mysql-port", mysqlPort, "mysql port")
utils.SetFlagBoolVar(Main.Flags(), &externalTopoServer, "external-topo-server", externalTopoServer, "Should vtcombo use an external topology server instead of starting its own in-memory topology server. "+
"If true, vtcombo will use the flags defined in topo/server.go to open topo server")
Expand Down
6 changes: 3 additions & 3 deletions go/cmd/vttablet/cli/cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
// TestRunFailsToStartTabletManager tests the code path in 'run' where we fail to start the TabletManager
// this is done by starting vttablet without a cnf file but requesting it to restore from backup.
// When starting, the TabletManager checks if it needs to restore, in tm.handleRestore but this step will
// fail if we do not provide a cnf file and if the flag --restore_from_backup is provided.
// fail if we do not provide a cnf file and if the flag --restore-from-backup is provided.
func TestRunFailsToStartTabletManager(t *testing.T) {
ts, factory := memorytopo.NewServerAndFactory(context.Background(), "cell")
topo.RegisterFactory("test", factory)
Expand Down Expand Up @@ -59,7 +59,7 @@ func TestRunFailsToStartTabletManager(t *testing.T) {
}

flagArgs = append(flagArgs,
"--tablet-path", "cell-1", "--restore_from_backup",
"--tablet-path", "cell-1", "--restore-from-backup",
)

os.Args = append([]string{"vttablet"}, flagArgs...)
Expand All @@ -69,5 +69,5 @@ func TestRunFailsToStartTabletManager(t *testing.T) {
defer cancel()

err := Main.ExecuteContext(ctx)
require.ErrorContains(t, err, "you cannot enable --restore_from_backup without a my.cnf file")
require.ErrorContains(t, err, "you cannot enable --restore-from-backup without a my.cnf file")
}
6 changes: 3 additions & 3 deletions go/cmd/vttestserver/cli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func New() (cmd *cobra.Command) {
"Define the fake cluster topology as a compact text format encoded"+
" vttest proto. See vttest.proto for more information.")

cmd.Flags().StringVar(&config.SchemaDir, "schema_dir", "",
utils.SetFlagStringVar(cmd.Flags(), &config.SchemaDir, "schema-dir", "",
"Directory for initial schema files. Within this dir,"+
" there should be a subdir for each keyspace. Within"+
" each keyspace dir, each file is executed as SQL"+
Expand All @@ -130,7 +130,7 @@ func New() (cmd *cobra.Command) {

cmd.Flags().StringVar(&config.DefaultSchemaDir, "default_schema_dir", "",
"Default directory for initial schema files. If no schema is found"+
" in schema_dir, default to this location.")
" in schema-dir, default to this location.")

cmd.Flags().StringVar(&config.DataDir, "data_dir", "",
"Directory where the data files will be placed, defaults to a random "+
Expand All @@ -146,7 +146,7 @@ func New() (cmd *cobra.Command) {
"If this flag is set, the MySQL data directory is not cleaned up"+
" when LocalCluster.TearDown() is called. This is useful for running"+
" vttestserver as a database container in local developer environments. Note"+
" that db migration files (--schema_dir option) and seeding of"+
" that db migration files (--schema-dir option) and seeding of"+
" random data (--initialize-with-random-data option) will only run during"+
" cluster startup if the data directory does not already exist. "+
" Changes to VSchema are persisted across cluster restarts using a simple"+
Expand Down
6 changes: 3 additions & 3 deletions go/cmd/vttestserver/cli/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ func TestMtlsAuth(t *testing.T) {
clientCert := path.Join(root, "client-cert.pem")
clientKey := path.Join(root, "client-key.pem")

// When cluster starts it will apply SQL and VSchema migrations in the configured schema_dir folder
// When cluster starts it will apply SQL and VSchema migrations in the configured schema-dir folder
// With mtls authorization enabled, the authorized CN must match the certificate's CN
cluster, err := startCluster(
utils.GetFlagVariantForTests("--grpc-auth-mode")+"=mtls",
Expand Down Expand Up @@ -341,7 +341,7 @@ func TestMtlsAuthUnauthorizedFails(t *testing.T) {
clientCert := path.Join(root, "client-cert.pem")
clientKey := path.Join(root, "client-key.pem")

// When cluster starts it will apply SQL and VSchema migrations in the configured schema_dir folder
// When cluster starts it will apply SQL and VSchema migrations in the configured schema-dir folder
// For mtls authorization failure by providing a client certificate with different CN thant the
// authorized in the configuration
cluster, err := startCluster(
Expand Down Expand Up @@ -376,7 +376,7 @@ var clusterKeyspaces = []string{

func startCluster(flags ...string) (cluster vttest.LocalCluster, err error) {
args := []string{"vttestserver"}
schemaDirArg := "--schema_dir=data/schema"
schemaDirArg := utils.GetFlagVariantForTests("--schema-dir") + "=data/schema"
tabletHostname := fmt.Sprintf("%s=localhost", utils.GetFlagVariantForTests("--tablet-hostname"))
keyspaceArg := "--keyspaces=" + strings.Join(clusterKeyspaces, ",")
numShardsArg := "--num_shards=2,2"
Expand Down
Loading
Loading