Skip to content

*: reads of SystemOnly settings from tenant process #91825

@stevendanna

Description

@stevendanna

Describe the problem

SystemOnly settings are not intended to be read from a tenant process. However, nothing actually disallows a tenant process from reading the in-memory default of a SystemOnly setting and taking actions on it.

The settings implementation includes a safety check for this was intended to be enabled in test builds, but that safety check requires (*Values).SetNonSystemTenant is called at some point during tenant startup. Currently we do not call that method so no accesses to SystemOnly settings from tenants are disallowed.

This recently tripped us up here #91824 and a quick test run with SetNonSystemTenant immediately hit our safety check on scheduler_latency.sample_period. It is likely that there are a number of other SystemOnly settings being accessed from tenant processes.

We should enable SetNonSystemTenant in our tests and work through the problems.

Jira issue: CRDB-21443
Epic: CRDB-6671

Metadata

Metadata

Assignees

Labels

A-multitenancyRelated to multi-tenancyC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions