cockroachdb / cockroach

CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
https://www.cockroachlabs.com
Other
30.21k stars 3.82k forks source link

settings: utilize LOCALITY GLOBAL for cluster settings #85738

Open ajwerner opened 2 years ago

ajwerner commented 2 years ago

Is your feature request related to a problem? Please describe.

Accessing cluster settings is important during cluster startup.

Describe the solution you'd like

The ideal tool to reduce the latency of reading cluster settings would be to set the system.settings table to use LOCALITY GLOBAL.

Describe alternatives you've considered Use stale reads and reason about any issues which might arise. The biggest problems seem related to cluster version potentially moving backwards. Perhaps we could work around this by waiting out some wall-clock time period when setting the version. This doesn't seem worth the complexity if we make it possible to set some system tables to LOCALITY GLOBAL.

Additional context This will depend on https://github.com/cockroachdb/cockroach/issues/63365.

Jira issue: CRDB-18412

rafiss commented 1 year ago

cc @JeffSwenson we re-discovered this issue during backlog grooming in SQL Schema. is this on your radar?

jeffswenson commented 1 year ago

This is not an issue for Serverless. When a tenant db is configured as multi-region, it configures the tenant settings as global. When CC automation creates a multi-region storage cluster, it uses zone configs to enable global reads on the storage cluster's settings table.

rafiss commented 1 year ago

Thanks for explaining! Then I'll leave this in our backlog for now until we see the priority come up in a different way.