sql/catalog/lease: optimize descriptor leasing protocol for cold start #85741
Labels
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
Is your feature request related to a problem? Please describe.
In order to use tables for DML queries, sql servers need to acquire leases for the underlying descriptors. The process of acquiring a lease on a descriptor required a number of KV operations:
Today, each of these operations will potentially leave the current region. We'd like it to be the case that we can acquire leases without leaving the current region.
Describe the solution you'd like
We ought to leverage a combination of
LOCALITY GLOBAL
andLOCALITY REGIONAL BY ROW
configurations for the relevant system tables.Describe alternatives you've considered
We could attempt to avoid the
LOCALITY GLOBAL
configuration on thesystem.descriptors
table if we used some other causality propagation mechanism. It's probably not worth the trouble.Additional context
The above leasing protocol is also used to cache password hashes, role membership, and virtual privileges. Those system will benefit transparently from the above work.
This work depends on being able to configure system tables with MR primitives (currently tracked in #63365).
Epic: CRDB-18596
Jira issue: CRDB-18414
The text was updated successfully, but these errors were encountered: