Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
irfansharif opened this issue Apr 7, 2022 · 1 comment
Closed
Assignees
Labels
A-zone-configs C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)

Comments

@irfansharif
Copy link
Contributor

irfansharif commented Apr 7, 2022

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

@irfansharif irfansharif added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) A-zone-configs labels Apr 7, 2022
@irfansharif irfansharif self-assigned this Apr 7, 2022
@irfansharif
Copy link
Contributor Author

Subsumed by #80148.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-zone-configs C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
Projects
None yet
Development

No branches or pull requests

2 participants