-
Notifications
You must be signed in to change notification settings - Fork 4.1k
spanconfig: add crdb_internal builtin to recompute tenant usage limit #79616
Copy link
Copy link
Closed
Labels
A-zone-configsC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
Description
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-zone-configsC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)