sql, server: add TokenBucket connector API and tenant resource limits configuration API#67508
Closed
RaduBerinde wants to merge 3 commits intocockroachdb:masterfrom
Closed
sql, server: add TokenBucket connector API and tenant resource limits configuration API#67508RaduBerinde wants to merge 3 commits intocockroachdb:masterfrom
RaduBerinde wants to merge 3 commits intocockroachdb:masterfrom
Conversation
Member
Add the system table described in the RFC (cockroachdb#66436). The table is only created for the system tenant. Release note: None
ecf359a to
9dedf5c
Compare
This change adds the TokenBucket API proposed in the RFC (cockroachdb#66436), a stub implementation for it, and the corresponding KV connector interface. The client and server-side code lives in ccl/multitenantccl/tenantcostclient and tenantcostserver. Release note: None
This commit adds a `crdb_internal.update_tenant_resource_limits` internal SQL function (to be used by the system tenant) which updates the token bucket configuration for a specific tenant. Release note: None
9dedf5c to
367c9ca
Compare
Member
Author
|
Closing this for now since there is ongoing discussion in the RFC about the system table details. I will post a smaller PR that's even more of a skeleton and doesn't depend on the system table. |
craig bot
pushed a commit
that referenced
this pull request
Jul 22, 2021
67067: server: require admin role to access node status r=bdarnell a=knz Release note (security update): The node status retrieval endpoints over HTTP (`/_status/nodes`, `/_status/nodes/<N>` and the web UI `/#/reports/nodes`) have been updated to require the `admin` role from the requesting user. This ensures that operational details such as network addresses and command-line flags do not leak to unprivileged users. 67733: colexecbase: extend support of casts r=yuzefovich a=yuzefovich Addresses: #48135 See individual commits for details. After this PR we only need to add more casts between natively supported types. 67768: sql, server: add skeleton TokenBucket connector and tenant resource limits configuration APIs r=RaduBerinde a=RaduBerinde This PR is a scaled back version of #67508 where we don't use the system table at all. It's meant to put some of the infrastructure pieces in place and provide a stub API for reconfiguration. The plan is to add consumption metrics on top of this soon so that CC can develop in parallel. --- #### server: add TokenBucket connector API This change adds the TokenBucket API proposed in the RFC (#66436), a stub implementation and client for it, and the corresponding KV connector interface. The client and server-side code lives in ccl/multitenantccl/tenantcostclient and tenantcostserver. Release note: None #### sql: tenant resource limits configuration API This commit adds a `crdb_internal.update_tenant_resource_limits` internal SQL function (to be used by the system tenant) which updates the token bucket configuration for a specific tenant. Release note: None 67840: sql: add test for creating stats on tables with expression indexes r=mgartner a=mgartner Release note: None Co-authored-by: Raphael 'kena' Poss <knz@thaumogen.net> Co-authored-by: Yahor Yuzefovich <yahor@cockroachlabs.com> Co-authored-by: Radu Berinde <radu@cockroachlabs.com> Co-authored-by: Marcus Gartner <marcus@cockroachlabs.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These commits introduce a skeleton implementation of the distributed token bucket APIs (RFC #66436).
I'm mainly looking for feedback on how things are broken up into modules/packages, on naming, and on the system table interaction code.
Note: the first commit is #67008.
server: add TokenBucket connector API
This change adds the TokenBucket API proposed in the RFC (#66436), a
stub implementation for it, and the corresponding KV connector
interface.
The client and server-side code lives in
ccl/multitenantccl/tenantcostclient and tenantcostserver.
Release note: None
sql: tenant resource limits configuration API
This commit adds a
crdb_internal.update_tenant_resource_limitsinternal SQL function (to be used by the system tenant) which updates
the token bucket configuration for a specific tenant.
Release note: None