Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*: give better name to certain cluster settings #109077

Merged
merged 1 commit into from
Aug 22, 2023
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: 1 addition & 1 deletion docs/RFCS/20211106_multitenant_cluster_settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ We propose splitting the cluster settings into three *classes*:
single command; the value applies to all tenants that don't have their own
specific value, including future tenants.

Examples: `kv.bulk_ingest.batch_size`, `tenant_cpu_usage_allowance`.
Examples: `kv.bulk_ingest.batch_size`, `tenant_cost_control.cpu_usage_allowance`.

3. Tenant writable (`tenant-rw`)

Expand Down
8 changes: 2 additions & 6 deletions docs/generated/settings/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
<tr><td><div id="setting-admission-epoch-lifo-epoch-duration" class="anchored"><code>admission.epoch_lifo.epoch_duration</code></div></td><td>duration</td><td><code>100ms</code></td><td>the duration of an epoch, for epoch-LIFO admission control ordering</td><td>Serverless/Dedicated/Self-Hosted</td></tr>
<tr><td><div id="setting-admission-epoch-lifo-queue-delay-threshold-to-switch-to-lifo" class="anchored"><code>admission.epoch_lifo.queue_delay_threshold_to_switch_to_lifo</code></div></td><td>duration</td><td><code>105ms</code></td><td>the queue delay encountered by a (tenant,priority) for switching to epoch-LIFO ordering</td><td>Serverless/Dedicated/Self-Hosted</td></tr>
<tr><td><div id="setting-admission-kv-enabled" class="anchored"><code>admission.kv.enabled</code></div></td><td>boolean</td><td><code>true</code></td><td>when true, work performed by the KV layer is subject to admission control</td><td>Dedicated/Self-Hosted</td></tr>
<tr><td><div id="setting-admission-kv-stores-tenant-weights-enabled" class="anchored"><code>admission.kv.stores.tenant_weights.enabled</code></div></td><td>boolean</td><td><code>false</code></td><td>when true, tenant weights are enabled for KV-stores admission control</td><td>Dedicated/Self-Hosted</td></tr>
<tr><td><div id="setting-admission-kv-tenant-weights-enabled" class="anchored"><code>admission.kv.tenant_weights.enabled</code></div></td><td>boolean</td><td><code>false</code></td><td>when true, tenant weights are enabled for KV admission control</td><td>Dedicated/Self-Hosted</td></tr>
<tr><td><div id="setting-admission-sql-kv-response-enabled" class="anchored"><code>admission.sql_kv_response.enabled</code></div></td><td>boolean</td><td><code>true</code></td><td>when true, work performed by the SQL layer when receiving a KV response is subject to admission control</td><td>Serverless/Dedicated/Self-Hosted</td></tr>
<tr><td><div id="setting-admission-sql-sql-response-enabled" class="anchored"><code>admission.sql_sql_response.enabled</code></div></td><td>boolean</td><td><code>true</code></td><td>when true, work performed by the SQL layer when receiving a DistSQL response is subject to admission control</td><td>Serverless/Dedicated/Self-Hosted</td></tr>
<tr><td><div id="setting-bulkio-backup-deprecated-full-backup-with-subdir-enabled" class="anchored"><code>bulkio.backup.deprecated_full_backup_with_subdir.enabled</code></div></td><td>boolean</td><td><code>false</code></td><td>when true, a backup command with a user specified subdirectory will create a full backup at the subdirectory if no backup already exists at that subdirectory</td><td>Serverless/Dedicated/Self-Hosted</td></tr>
Expand Down Expand Up @@ -92,7 +90,6 @@
<tr><td><div id="setting-server-clock-forward-jump-check-enabled" class="anchored"><code>server.clock.forward_jump_check.enabled</code></div></td><td>boolean</td><td><code>false</code></td><td>if enabled, forward clock jumps &gt; max_offset/2 will cause a panic</td><td>Serverless/Dedicated/Self-Hosted</td></tr>
<tr><td><div id="setting-server-clock-persist-upper-bound-interval" class="anchored"><code>server.clock.persist_upper_bound_interval</code></div></td><td>duration</td><td><code>0s</code></td><td>the interval between persisting the wall time upper bound of the clock. The clock does not generate a wall time greater than the persisted timestamp and will panic if it sees a wall time greater than this value. When cockroach starts, it waits for the wall time to catch-up till this persisted timestamp. This guarantees monotonic wall time across server restarts. Not setting this or setting a value of 0 disables this feature.</td><td>Serverless/Dedicated/Self-Hosted</td></tr>
<tr><td><div id="setting-server-consistency-check-max-rate" class="anchored"><code>server.consistency_check.max_rate</code></div></td><td>byte size</td><td><code>8.0 MiB</code></td><td>the rate limit (bytes/sec) to use for consistency checks; used in conjunction with server.consistency_check.interval to control the frequency of consistency checks. Note that setting this too high can negatively impact performance.</td><td>Dedicated/Self-Hosted</td></tr>
<tr><td><div id="setting-server-controller-default-tenant" class="anchored"><code>server.controller.default_tenant</code></div></td><td>string</td><td><code>system</code></td><td>name of the tenant to use to serve requests when clients don&#39;t specify a tenant</td><td>Dedicated/Self-Hosted</td></tr>
<tr><td><div id="setting-server-eventlog-enabled" class="anchored"><code>server.eventlog.enabled</code></div></td><td>boolean</td><td><code>true</code></td><td>if set, logged notable events are also stored in the table system.eventlog</td><td>Serverless/Dedicated/Self-Hosted</td></tr>
<tr><td><div id="setting-server-eventlog-ttl" class="anchored"><code>server.eventlog.ttl</code></div></td><td>duration</td><td><code>2160h0m0s</code></td><td>if nonzero, entries in system.eventlog older than this duration are periodically purged</td><td>Serverless/Dedicated/Self-Hosted</td></tr>
<tr><td><div id="setting-server-host-based-authentication-configuration" class="anchored"><code>server.host_based_authentication.configuration</code></div></td><td>string</td><td><code></code></td><td>host-based authentication configuration to use during connection authentication</td><td>Serverless/Dedicated/Self-Hosted</td></tr>
Expand All @@ -113,7 +110,6 @@
<tr><td><div id="setting-server-oidc-authentication-redirect-url" class="anchored"><code>server.oidc_authentication.redirect_url</code></div></td><td>string</td><td><code>https://localhost:8080/oidc/v1/callback</code></td><td>sets OIDC redirect URL via a URL string or a JSON string containing a required `redirect_urls` key with an object that maps from region keys to URL strings (URLs should point to your load balancer and must route to the path /oidc/v1/callback)</td><td>Serverless/Dedicated/Self-Hosted</td></tr>
<tr><td><div id="setting-server-oidc-authentication-scopes" class="anchored"><code>server.oidc_authentication.scopes</code></div></td><td>string</td><td><code>openid</code></td><td>sets OIDC scopes to include with authentication request (space delimited list of strings, required to start with `openid`)</td><td>Serverless/Dedicated/Self-Hosted</td></tr>
<tr><td><div id="setting-server-rangelog-ttl" class="anchored"><code>server.rangelog.ttl</code></div></td><td>duration</td><td><code>720h0m0s</code></td><td>if nonzero, entries in system.rangelog older than this duration are periodically purged</td><td>Serverless/Dedicated/Self-Hosted</td></tr>
<tr><td><div id="setting-server-secondary-tenants-redact-trace-enabled" class="anchored"><code>server.secondary_tenants.redact_trace.enabled</code></div></td><td>boolean</td><td><code>true</code></td><td>controls if server side traces are redacted for tenant operations</td><td>Dedicated/Self-Hosted</td></tr>
<tr><td><div id="setting-server-shutdown-connection-wait" class="anchored"><code>server.shutdown.connection_wait</code></div></td><td>duration</td><td><code>0s</code></td><td>the maximum amount of time a server waits for all SQL connections to be closed before proceeding with a drain. (note that the --drain-wait parameter for cockroach node drain may need adjustment after changing this setting)</td><td>Serverless/Dedicated/Self-Hosted</td></tr>
<tr><td><div id="setting-server-shutdown-drain-wait" class="anchored"><code>server.shutdown.drain_wait</code></div></td><td>duration</td><td><code>0s</code></td><td>the amount of time a server waits in an unready state before proceeding with a drain (note that the --drain-wait parameter for cockroach node drain may need adjustment after changing this setting. --drain-wait is to specify the duration of the whole draining process, while server.shutdown.drain_wait is to set the wait time for health probes to notice that the node is not ready.)</td><td>Serverless/Dedicated/Self-Hosted</td></tr>
<tr><td><div id="setting-server-shutdown-jobs-wait" class="anchored"><code>server.shutdown.jobs_wait</code></div></td><td>duration</td><td><code>10s</code></td><td>the maximum amount of time a server waits for all currently executing jobs to notice drain request and to perform orderly shutdown</td><td>Serverless/Dedicated/Self-Hosted</td></tr>
Expand All @@ -132,8 +128,8 @@
<tr><td><div id="setting-server-web-session-purge-ttl" class="anchored"><code>server.web_session.purge.ttl</code></div></td><td>duration</td><td><code>1h0m0s</code></td><td>if nonzero, entries in system.web_sessions older than this duration are periodically purged</td><td>Serverless/Dedicated/Self-Hosted</td></tr>
<tr><td><div id="setting-server-web-session-timeout" class="anchored"><code>server.web_session.timeout</code></div></td><td>duration</td><td><code>168h0m0s</code></td><td>the duration that a newly created web session will be valid</td><td>Serverless/Dedicated/Self-Hosted</td></tr>
<tr><td><div id="setting-spanconfig-bounds-enabled" class="anchored"><code>spanconfig.bounds.enabled</code></div></td><td>boolean</td><td><code>true</code></td><td>dictates whether span config bounds are consulted when serving span configs for secondary tenants</td><td>Dedicated/Self-Hosted</td></tr>
<tr><td><div id="setting-spanconfig-storage-coalesce-adjacent-enabled" class="anchored"><code>spanconfig.storage_coalesce_adjacent.enabled</code></div></td><td>boolean</td><td><code>true</code></td><td>collapse adjacent ranges with the same span configs, for the ranges specific to the system tenant</td><td>Dedicated/Self-Hosted</td></tr>
<tr><td><div id="setting-spanconfig-tenant-coalesce-adjacent-enabled" class="anchored"><code>spanconfig.tenant_coalesce_adjacent.enabled</code></div></td><td>boolean</td><td><code>true</code></td><td>collapse adjacent ranges with the same span configs across all secondary tenant keyspaces</td><td>Dedicated/Self-Hosted</td></tr>
<tr><td><div id="setting-spanconfig-storage-coalesce-adjacent-enabled" class="anchored"><code>spanconfig.range_coalescing.system.enabled</code></div></td><td>boolean</td><td><code>true</code></td><td>collapse adjacent ranges with the same span configs, for the ranges specific to the system tenant</td><td>Dedicated/Self-Hosted</td></tr>
<tr><td><div id="setting-spanconfig-tenant-coalesce-adjacent-enabled" class="anchored"><code>spanconfig.range_coalescing.application.enabled</code></div></td><td>boolean</td><td><code>true</code></td><td>collapse adjacent ranges with the same span configs across all secondary tenant keyspaces</td><td>Dedicated/Self-Hosted</td></tr>
<tr><td><div id="setting-sql-auth-change-own-password-enabled" class="anchored"><code>sql.auth.change_own_password.enabled</code></div></td><td>boolean</td><td><code>false</code></td><td>controls whether a user is allowed to change their own password, even if they have no other privileges</td><td>Serverless/Dedicated/Self-Hosted</td></tr>
<tr><td><div id="setting-sql-auth-public-schema-create-privilege-enabled" class="anchored"><code>sql.auth.public_schema_create_privilege.enabled</code></div></td><td>boolean</td><td><code>true</code></td><td>determines whether to grant all users the CREATE privileges on the public schema when it is created</td><td>Serverless/Dedicated/Self-Hosted</td></tr>
<tr><td><div id="setting-sql-auth-resolve-membership-single-scan-enabled" class="anchored"><code>sql.auth.resolve_membership_single_scan.enabled</code></div></td><td>boolean</td><td><code>true</code></td><td>determines whether to populate the role membership cache with a single scan</td><td>Serverless/Dedicated/Self-Hosted</td></tr>
Expand Down
2 changes: 1 addition & 1 deletion pkg/bench/foreachdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ func benchmarkSepProcessTenantCockroach(b *testing.B, f BenchmarkFn) {
// The benchmarks sometime hit the default span limit, so we increase it.
// NOTE(andrei): Benchmarks drop the tables they're creating, so I'm not sure
// if hitting this limit is expected.
_, err := db.Exec(`ALTER TENANT ALL SET CLUSTER SETTING "spanconfig.tenant_limit" = 10000000`)
_, err := db.Exec(`ALTER TENANT ALL SET CLUSTER SETTING "spanconfig.virtual_cluster.max_spans" = 10000000`)
require.NoError(b, err)

_, err = tenantDB.Exec(`CREATE DATABASE bench`)
Expand Down
2 changes: 1 addition & 1 deletion pkg/ccl/backupccl/backup_tenant_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func TestBackupTenantImportingTable(t *testing.T) {

// TestTenantBackupMultiRegionDatabases ensures secondary tenants restoring
// MR databases respect the
// sql.multi_region.allow_abstractions_for_secondary_tenants.enabled cluster
// sql.virtual_cluster.feature_access.multiregion.enabled cluster
// setting.
func TestTenantBackupMultiRegionDatabases(t *testing.T) {
defer leaktest.AfterTest(t)()
Expand Down
2 changes: 1 addition & 1 deletion pkg/ccl/kvccl/kvfollowerreadsccl/followerreads_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -970,7 +970,7 @@ func TestSecondaryTenantFollowerReadsRouting(t *testing.T) {
systemSQL.Exec(t, `ALTER TENANT ALL SET CLUSTER SETTING kv.closed_timestamp.propagation_slack = '0.1s'`)
// We're making assertions on traces collected by the tenant using log lines
// in KV so we must ensure they're not redacted.
systemSQL.Exec(t, `SET CLUSTER SETTING server.secondary_tenants.redact_trace.enabled = 'false'`)
systemSQL.Exec(t, `SET CLUSTER SETTING trace.redact_at_virtual_cluster_boundary.enabled = 'false'`)

dbs := make([]*gosql.DB, numNodes)
for i := 0; i < numNodes; i++ {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# tenant-cluster-setting-override-opt: sql.zone_configs.allow_for_secondary_tenant.enabled=true sql.multi_region.allow_abstractions_for_secondary_tenants.enabled=true
# tenant-cluster-setting-override-opt: sql.virtual_cluster.feature_access.zone_configs.enabled=true sql.virtual_cluster.feature_access.multiregion.enabled=true
# LogicTest: multiregion-9node-3region-3azs multiregion-9node-3region-3azs-no-los

statement ok
Expand Down
2 changes: 1 addition & 1 deletion pkg/ccl/logictestccl/testdata/logic_test/auto_rehoming
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# tenant-cluster-setting-override-opt: sql.multi_region.allow_abstractions_for_secondary_tenants.enabled=true
# tenant-cluster-setting-override-opt: sql.virtual_cluster.feature_access.multiregion.enabled=true
# LogicTest: local

statement ok
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ test {}
statement ok
CREATE TABLE foo (a INT PRIMARY KEY, INDEX idx(a)); INSERT INTO foo VALUES(1)

statement error tenant cluster setting sql.split_at.allow_for_secondary_tenant.enabled disabled
statement error tenant cluster setting sql.virtual_cluster.feature_access.manual_range_split.enabled disabled
ALTER TABLE foo SPLIT AT VALUES(2)

# Make sure that the cluster id isn't unset.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# tenant-cluster-setting-override-opt: sql.multi_region.allow_abstractions_for_secondary_tenants.enabled=true
# tenant-cluster-setting-override-opt: sql.virtual_cluster.feature_access.multiregion.enabled=true
# LogicTest: multiregion-9node-3region-3azs multiregion-9node-3region-3azs-vec-off multiregion-9node-3region-3azs-no-los

statement ok
Expand Down
2 changes: 1 addition & 1 deletion pkg/ccl/logictestccl/testdata/logic_test/multi_region
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# tenant-cluster-setting-override-opt: sql.multi_region.allow_abstractions_for_secondary_tenants.enabled=true
# tenant-cluster-setting-override-opt: sql.virtual_cluster.feature_access.multiregion.enabled=true
# knob-opt: sync-event-log
# LogicTest: multiregion-9node-3region-3azs multiregion-9node-3region-3azs-tenant multiregion-9node-3region-3azs-no-los

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# tenant-cluster-setting-override-opt: sql.multi_region.allow_abstractions_for_secondary_tenants.enabled=true
# tenant-cluster-setting-override-opt: sql.virtual_cluster.feature_access.multiregion.enabled=true
# LogicTest: multiregion-9node-3region-3azs

# This file contains a regression test for ALTER TABLE ... REGIONAL BY ROW
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# tenant-cluster-setting-override-opt: sql.zone_configs.allow_for_secondary_tenant.enabled=true sql.multi_region.allow_abstractions_for_secondary_tenants.enabled=true
# tenant-cluster-setting-override-opt: sql.virtual_cluster.feature_access.zone_configs.enabled=true sql.virtual_cluster.feature_access.multiregion.enabled=true
# LogicTest: multiregion-9node-3region-3azs multiregion-9node-3region-3azs-no-los

# Tests in this file assume no multi-region tenant setup as tenants have no
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# tenant-cluster-setting-override-opt: sql.multi_region.allow_abstractions_for_secondary_tenants.enabled=true
# tenant-cluster-setting-override-opt: sql.virtual_cluster.feature_access.multiregion.enabled=true
# LogicTest: multiregion-9node-3region-3azs multiregion-9node-3region-3azs-tenant multiregion-9node-3region-3azs-no-los

statement ok
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# tenant-cluster-setting-override-opt: sql.multi_region.allow_abstractions_for_secondary_tenants.enabled=true
# tenant-cluster-setting-override-opt: sql.virtual_cluster.feature_access.multiregion.enabled=true
# LogicTest: multiregion-9node-3region-3azs multiregion-9node-3region-3azs-tenant multiregion-9node-3region-3azs-no-los

query TTTTT rowsort
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# tenant-cluster-setting-override-opt: sql.multi_region.allow_abstractions_for_secondary_tenants.enabled=true
# tenant-cluster-setting-override-opt: sql.virtual_cluster.feature_access.multiregion.enabled=true
# LogicTest: multiregion-9node-3region-3azs !metamorphic-batch-sizes

# Set the closed timestamp interval to be short to shorten the amount of time
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# tenant-cluster-setting-override-opt: sql.multi_region.allow_abstractions_for_secondary_tenants.enabled=true
# tenant-cluster-setting-override-opt: sql.virtual_cluster.feature_access.multiregion.enabled=true
# LogicTest: multiregion-9node-3region-3azs multiregion-9node-3region-3azs-vec-off multiregion-9node-3region-3azs-no-los

# Tests in this file assume no multi-region tenant setup as tenants have no
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# tenant-cluster-setting-override-opt: sql.multi_region.allow_abstractions_for_secondary_tenants.enabled=true
# tenant-cluster-setting-override-opt: sql.virtual_cluster.feature_access.multiregion.enabled=true
# LogicTest: multiregion-9node-3region-3azs
# TODO(#75864): enable multiregion-9node-3region-3azs-tenant.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# tenant-cluster-setting-override-opt: sql.multi_region.allow_abstractions_for_secondary_tenants.enabled=true
# tenant-cluster-setting-override-opt: sql.virtual_cluster.feature_access.multiregion.enabled=true
# LogicTest: multiregion-9node-3region-3azs multiregion-9node-3region-3azs-tenant multiregion-9node-3region-3azs-no-los

user root
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# tenant-cluster-setting-override-opt: sql.multi_region.allow_abstractions_for_secondary_tenants.enabled=true
# tenant-cluster-setting-override-opt: sql.virtual_cluster.feature_access.multiregion.enabled=true
# LogicTest: multiregion-9node-3region-3azs multiregion-9node-3region-3azs-no-los
# TODO(#75864): enable multiregion-9node-3region-3azs-tenant.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# tenant-cluster-setting-override-opt: sql.multi_region.allow_abstractions_for_secondary_tenants.enabled=true
# tenant-cluster-setting-override-opt: sql.virtual_cluster.feature_access.multiregion.enabled=true
# LogicTest: multiregion-9node-3region-3azs multiregion-9node-3region-3azs-vec-off !metamorphic-batch-sizes
# Currently this test and other multiregion tests may flake often when run
# under the multiregion-9node-3region-3azs-vec-off config, and less often
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# LogicTest: multiregion-9node-3region-3azs-tenant

statement error pq: setting sql.multi_region.allow_abstractions_for_secondary_tenants.enabled disallows use of multi-region abstractions
statement error pq: setting sql.virtual_cluster.feature_access.multiregion.enabled disallows use of multi-region abstractions
CREATE DATABASE db PRIMARY REGION "us-east1"

statement ok
CREATE DATABASE db

statement error pq: setting sql.multi_region.allow_abstractions_for_secondary_tenants.enabled disallows use of multi-region abstractions
statement error pq: setting sql.virtual_cluster.feature_access.multiregion.enabled disallows use of multi-region abstractions
ALTER DATABASE db SET PRIMARY REGION "us-east-1"
Loading