From e93430e09b1a9145e0528cbde8aa18ff12c92f03 Mon Sep 17 00:00:00 2001 From: Jay Date: Fri, 1 Oct 2021 14:32:42 -0400 Subject: [PATCH] cli: add --max-sql-memory flag to `cockroach mt start-sql` Previously the `--max-sql-memory` flag wasn't available to the multi-tenancy start-sql command, even thought the feature was already there for other `start`-related commands. Release note (cli change): `cockroach mt start-sql` will now support the `--max-sql-memory` flag to configure maximum SQL memory capacity to store temporary data. Release justification: The upcoming Serverless MVP release plans to use a different value for --max-sql-memory instead of the default value of 25% of container memory. This commit is only a flag change that will only be used in multi-tenant scenarios, and should have no impact on dedicated customers. --- pkg/cli/flags.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/cli/flags.go b/pkg/cli/flags.go index e02825164f5f..b844464e8dca 100644 --- a/pkg/cli/flags.go +++ b/pkg/cli/flags.go @@ -933,7 +933,7 @@ func init() { } } - // Multi-tenancy commands. + // Multi-tenancy start-sql command flags. { f := mtStartSQLCmd.Flags() varFlag(f, &tenantIDWrapper{&serverCfg.SQLConfig.TenantID}, cliflags.TenantID) @@ -954,10 +954,13 @@ func init() { stringSliceFlag(f, &serverCfg.SQLConfig.TenantKVAddrs, cliflags.KVAddrs) + // Enable/disable various external storage endpoints. boolFlag(f, &serverCfg.ExternalIODirConfig.DisableHTTP, cliflags.ExternalIODisableHTTP) boolFlag(f, &serverCfg.ExternalIODirConfig.DisableOutbound, cliflags.ExternalIODisabled) boolFlag(f, &serverCfg.ExternalIODirConfig.DisableImplicitCredentials, cliflags.ExternalIODisableImplicitCredentials) + // Engine flags. + varFlag(f, sqlSizeValue, cliflags.SQLMem) // N.B. diskTempStorageSizeValue.ResolvePercentage() will be called after // the stores flag has been parsed and the storage device that a percentage // refers to becomes known.