spanconfig: add crdb_internal builtin to recompute tenant usage limit #79616
Labels
A-zone-configs
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.
#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
The text was updated successfully, but these errors were encountered: