Skip to content

Commit

Permalink
cli: add --max-sql-memory flag to cockroach mt start-sql
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jaylim-crl committed Oct 6, 2021
1 parent 5175a31 commit e93430e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/cli/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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.
Expand Down

0 comments on commit e93430e

Please sign in to comment.