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

reports: generate replication reports for secondary tenants #70557

Closed
irfansharif opened this issue Sep 22, 2021 · 3 comments
Closed

reports: generate replication reports for secondary tenants #70557

irfansharif opened this issue Sep 22, 2021 · 3 comments
Labels
A-multitenancy Related to multi-tenancy A-sql-observability Related to observability of the SQL layer 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 Sep 22, 2021

#66348 outlined a scheme to support zone configs for secondary tenants; we've implemented an MVP as part of #67679. One thing we skipped was replication reports and generating them for secondary tenants. The code generating these reports today sits under pkg/kv/kvserver/reports, and is very tightly coupled to the system config span (so it only works for the system tenant). We want to generate these same reports for secondary tenants. Probably we can hoist all that code out of pkg/kv, strip out the dependency on config.SystemSystem, generate them within the pods by power it using a view over system.{descriptor,zones}. To generate these reports, we need access to store descriptors and node liveness; we could expose RPCs through the Connector interface to retrieve these. (We should probably only export the portions relevant to these reports.)

Jira issue: CRDB-10117

@blathers-crl
Copy link

blathers-crl bot commented Sep 22, 2021

Hi @irfansharif, please add a C-ategory label to your issue. Check out the label system docs.

While you're here, please consider adding an A- label to help keep our repository tidy.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan.

@irfansharif irfansharif added A-zone-configs C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) A-sql-observability Related to observability of the SQL layer labels Sep 22, 2021
@irfansharif
Copy link
Contributor Author

This issue covers two concerns:
a) Using the new span configs infrastructure to power replication reports for the host tenant;
b) Generating span-configs-infrastructure-powered reports for secondary tenants.

@ajwerner thought of with this cute hack to do (a), non-invasively swapping out the reports dependency on the system config span in favor of a spanconfig.Store (#70287): when translating (#71359) zone configs to span configs, we could also include the descriptor ID and partition index as part of the spanconfig proto. In our report generation code, with a conveniently populated spanconfig.Store, we could then just reverse-lookup the span config for a given descriptor ID.

zone, err := getZoneByID(i, v.cfg)

@irfansharif
Copy link
Contributor Author

#89987 (comment)

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-sql-observability Related to observability of the SQL layer 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