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

Conversation

knz
Copy link
Contributor

@knz knz commented Aug 19, 2023

Follows #109048.
Epic: CRDB-29380

The following settings have been renamed so they group together under a common prefix:

Previous name New name
tenant_external_io_default_bytes_allowed_before_accounting tenant_cost_control.external_io.byte_usage_allowance
tenant_external_io_ru_accounting_mode tenant_cost_control.external_io.ru_accounting_mode
tenant_cost_control_period tenant_cost_control.token_request_period
tenant_cpu_usage_allowance tenant_cost_control.cpu_usage_allowance
tenant_usage_instance_inactivity tenant_cost_control.instance_inactivity.timeout

Similarly:

Previous name New name
sql.multi_region.allow_abstractions_for_secondary_tenants.enabled sql.virtual_cluster.feature_access.multiregion.enabled
sql.zone_configs.allow_for_secondary_tenant.enabled sql.virtual_cluster.feature_access.zone_configs.enabled
sql.split_at.allow_for_secondary_tenant.enabled sql.virtual_cluster.feature_access.manual_range_split.enabled
sql.scatter.allow_for_secondary_tenant.enabled sql.virtual_cluster.feature_access.manual_range_scatter.enabled

The following setting have been renamed because they are not specific to multi-tenancy:

Previous name New name
sql.tenant_ru_estimation.enabled sql.explain_analyze.include_ru_estimation.enabled
server.secondary_tenants.redact_trace.enabled trace.redact_traces_at_virtual_cluster_boundary.enabled
server.secondary_tenants.authorization.mode server.virtual_cluster_authorization.mode
spanconfig.tenant_coalesce_adjacent.enabled spanconfig.range_coalescing.application.enabled
spanconfig.storage_coalesce_adjacent.enabled spanconfig.range_coalescing.system.enabled
spanconfig.tenant_limit spanconfig.virtual_cluster.max_spans

The following have been renamed to e-emphasize "tenants" and for
coherence with the use of the key cluster in SQL and HTTP requests:

Previous name New name
server.controller.default_tenant server.controller.default_target_cluster
server.controller.default_tenant.check_service.enabled server.controller.default_target_cluster.check_service.enabled

The following has been renamed for coherence with the SQL syntax:

Previous name New name
sql.create_tenant.default_template sql.create_virtual_cluster.default_template

The following settings are also now marked as non-public, since they
were not meant for use by end-users yet:

  • server.controller.default_tenant
  • trace.redact_traces_at_virtual_cluster_boundary.enabled
  • admission.kv.tenant_weights.enabled
  • admission.kv.stores.tenant_weights.enabled

Release note (cli change): The following cluster settings have been
renamed. The previous names are available for backward-compatibility.

Previous name New name
spanconfig.tenant_coalesce_adjacent.enabled spanconfig.range_coalescing.application.enabled
spanconfig.storage_coalesce_adjacent.enabled spanconfig.range_coalescing.system.enabled

@knz knz requested review from stevendanna and yuzefovich August 19, 2023 15:38
@knz knz requested review from a team as code owners August 19, 2023 15:38
@knz knz requested a review from a team August 19, 2023 15:38
@knz knz requested a review from a team as a code owner August 19, 2023 15:38
@knz knz requested a review from a team August 19, 2023 15:38
@knz knz requested review from a team as code owners August 19, 2023 15:38
@knz knz requested review from srosenberg and renatolabs and removed request for a team August 19, 2023 15:38
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@knz knz removed request for a team, srosenberg and renatolabs August 19, 2023 15:38
@knz knz mentioned this pull request Aug 20, 2023
@knz knz force-pushed the 20230819-rename-settings3 branch from 7ef13d9 to b512ce8 Compare August 20, 2023 08:59
craig bot pushed a commit that referenced this pull request Aug 20, 2023
109098: sql: fix a leftover bug r=stevendanna a=knz

This (hidden) bug was left over from #108902.
There is no visible negative effect to this bug being present until setting aliases are effectively introduced, which hasn't happened yet.

No tests included here -- this is exercised by #109077 and #109074 and the CI in those PRs readily fail without this fix.

 Epic: CRDB-27642

Co-authored-by: Raphael 'kena' Poss <[email protected]>
@knz knz force-pushed the 20230819-rename-settings3 branch 4 times, most recently from 15bab30 to bf1c079 Compare August 21, 2023 11:58
craig bot pushed a commit that referenced this pull request Aug 21, 2023
109118: sql: fix another buglet with tenant settings r=stevendanna a=knz

This (hidden) bug was left over from #108902.
There is no visible negative effect to this bug being present until setting aliases are effectively introduced, which hasn't happened yet.

The code modified here is already properly exercised by logic tests.
Also, this is exercised by #109077 and #109074 and the CI in those PRs readily fail without this fix.

Epic: CRDB-27642

Co-authored-by: Raphael 'kena' Poss <[email protected]>
@knz knz force-pushed the 20230819-rename-settings3 branch 3 times, most recently from b6d30b4 to 1a3cc92 Compare August 21, 2023 16:58
Copy link
Collaborator

@stevendanna stevendanna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These looks good to me, but would also be interested in @yuzefovich's thoughts.

Copy link
Member

@yuzefovich yuzefovich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm: to me too.

Reviewed 36 of 94 files at r2, 1 of 5 files at r3, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @knz)


pkg/server/node.go line 246 at r3 (raw file):

		settings.SystemOnly,
		"server.secondary_tenants.redact_trace.enabled",
		"if enabled, storage/KV trace results are rediacted when returned to a virtual cluster",

nit: s/rediacted/redacted/.


pkg/sql/exec_util.go line 237 at r3 (raw file):

	settings.TenantReadOnly,
	"sql.scatter.allow_for_secondary_tenant.enabled",
	"allow secondary tenants to run ALTER TABLE/INDEX ... SCATTER commands; does not affect the system tenant",

nit: should this also be reworded to use "virtual clusters"?

The following settings have been renamed so they group together under a common prefix:

| Previous name                                                | New name                                               |
|--------------------------------------------------------------|--------------------------------------------------------|
| `tenant_external_io_default_bytes_allowed_before_accounting` | `tenant_cost_control.external_io.byte_usage_allowance` |
| `tenant_external_io_ru_accounting_mode`                      | `tenant_cost_control.external_io.ru_accounting_mode`   |
| `tenant_cost_control_period`                                 | `tenant_cost_control.token_request_period`             |
| `tenant_cpu_usage_allowance`                                 | `tenant_cost_control.cpu_usage_allowance`              |
| `tenant_usage_instance_inactivity`                           | `tenant_cost_control.instance_inactivity.timeout`      |

Similarly:

| Previous name                                                       | New name                                                          |
|---------------------------------------------------------------------|-------------------------------------------------------------------|
| `sql.multi_region.allow_abstractions_for_secondary_tenants.enabled` | `sql.virtual_cluster.feature_access.multiregion.enabled`         |
| `sql.zone_configs.allow_for_secondary_tenant.enabled`               | `sql.virtual_cluster.feature_access.zone_configs.enabled`         |
| `sql.split_at.allow_for_secondary_tenant.enabled`                   | `sql.virtual_cluster.feature_access.manual_range_split.enabled`   |
| `sql.scatter.allow_for_secondary_tenant.enabled`                    | `sql.virtual_cluster.feature_access.manual_range_scatter.enabled` |

The following setting have been renamed because they are not specific to multi-tenancy:

| Previous name                                   | New name                                                  |
|-------------------------------------------------|-----------------------------------------------------------|
| `sql.tenant_ru_estimation.enabled`              | `sql.explain_analyze.include_ru_estimation.enabled`       |
| `server.secondary_tenants.redact_trace.enabled` | `trace.redact_traces_at_virtual_cluster_boundary.enabled` |
| `server.secondary_tenants.authorization.mode`   | `server.virtual_cluster_authorization.mode`               |
| `spanconfig.tenant_coalesce_adjacent.enabled`   | `spanconfig.range_coalescing.application.enabled`         |
| `spanconfig.storage_coalesce_adjacent.enabled`  | `spanconfig.range_coalescing.system.enabled`              |
| `spanconfig.tenant_limit` | `spanconfig.virtual_cluster.max_spans` |

The following have been renamed to e-emphasize "tenants" and for
coherence with the use of the key `cluster` in SQL and HTTP requests:

| Previous name                                            | New name                                                         |
|----------------------------------------------------------|------------------------------------------------------------------|
| `server.controller.default_tenant`                       | `server.controller.default_target_cluster`                       |
| `server.controller.default_tenant.check_service.enabled` | `server.controller.default_target_cluster.check_service.enabled` |

The following has been renamed for coherence with the SQL syntax:

| Previous name                        | New name                                      |
|--------------------------------------|-----------------------------------------------|
| `sql.create_tenant.default_template` | `sql.create_virtual_cluster.default_template` |

The following settings are also now marked as non-public, since they
were not meant for use by end-users yet:

- `server.controller.default_tenant`
- `trace.redact_traces_at_virtual_cluster_boundary.enabled`
- `admission.kv.tenant_weights.enabled`
- `admission.kv.stores.tenant_weights.enabled`

Release note (cli change): The following cluster settings have been
renamed. The previous names are available for backward-compatibility.

| Previous name                                  | New name                                          |
|------------------------------------------------|---------------------------------------------------|
| `spanconfig.tenant_coalesce_adjacent.enabled`  | `spanconfig.range_coalescing.application.enabled` |
| `spanconfig.storage_coalesce_adjacent.enabled` | `spanconfig.range_coalescing.system.enabled`      |
@knz knz force-pushed the 20230819-rename-settings3 branch from 1a3cc92 to 9dc56ae Compare August 22, 2023 07:17
@knz
Copy link
Contributor Author

knz commented Aug 22, 2023

TFYR!

bors r=stevendanna,yuzefovich

@craig
Copy link
Contributor

craig bot commented Aug 22, 2023

Build succeeded:

@craig craig bot merged commit 42e3988 into cockroachdb:master Aug 22, 2023
@knz knz deleted the 20230819-rename-settings3 branch August 22, 2023 08:09
Copy link
Contributor Author

@knz knz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (and 1 stale)


pkg/server/node.go line 246 at r3 (raw file):

Previously, yuzefovich (Yahor Yuzefovich) wrote…

nit: s/rediacted/redacted/.

Fixed.


pkg/sql/exec_util.go line 237 at r3 (raw file):

Previously, yuzefovich (Yahor Yuzefovich) wrote…

nit: should this also be reworded to use "virtual clusters"?

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants