Skip to content

spanconfig: add crdb_internal builtin to recompute tenant usage limit #79616

@irfansharif

Description

@irfansharif

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

#77337 introduces a per-tenant tenant-side limiter for span configs. It intercepts every schema change txn and computes a delta over the number of configurable spans, using it to maintain a tenant-side counter (which in turn is used to reject txns if exceeding a configured limit). If this counter was miscounted for whatever reason, it'd be a useful to be able to "reset" the counter; a builtin would help.

Describe the solution you'd like

Something along the lines of crdb_internal.span_config_recompute_span_count().

Additional context

See #77337 (review). While here, ensure that tenants can't just modify this counter as they see fit.

Jira issue: CRDB-14946

Metadata

Metadata

Assignees

Labels

A-zone-configsC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions