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

sql: construct and maintain in-memory state to tack tenants sql-zcfgs/kv-scfgs #66612

Closed
arulajmani opened this issue Jun 17, 2021 · 1 comment
Assignees
Labels
A-multitenancy Related to multi-tenancy A-zone-configs C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)

Comments

@arulajmani
Copy link
Collaborator

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

As part of #66348, every sql pod will be responsible for reconciling sql-zcfgs to kv-scfgs. To do so, the sql pod would maintain an in-memory structure that captures descriptor hierarchies, the tenant's sql-zcfg information, the desired kv-scfgs state, and the actual kv-scfgs state. I'm tentatively calling this ZoneConfigReconciliationState.

The ZoneConfigReconciliationState should be able to react to zone configuration/descriptor updates. This would allow us to hook this thing up to a rangefeed on these tables later.

Additionally, the ZoneConfigReconciliationState should also be able to hydrate zone configurations by following up inheritance chains, construct span configurations, and find deltas between two sets of span configs.

@arulajmani arulajmani added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) A-zone-configs A-multitenancy Related to multi-tenancy labels Jun 17, 2021
@arulajmani arulajmani self-assigned this Jun 17, 2021
@arulajmani
Copy link
Collaborator Author

Talked to @ajwerner and I don't think we need to store all of this state in memory. Instead, we should get a transactional view of these things by reading from system.zones and system.descriptors instead. Also realized that the desired kv-scfgs and actual kv-scfgs should be done via RPCs instead of an in-memory diff that @irfansharif and I discussed earlier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-multitenancy Related to multi-tenancy 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

1 participant