Is your feature request related to a problem? Please describe.
Part of: #89429
Blockers: #82879, #90267
As part of our effort to migrate to a multi-tenant architecture, we need to ensure our existing database details endpoint is tenant-scoped.
Unfortunately, the DatabaseDetails endpoint makes use of two functions that block our ability to scope to tenants:
To maintain all information we provide currently, the blockers above would need to be resolved to allow the endpoint to be tenant-scoped.
Alternatively, If we choose to initially omit database statistics from the DatabaseDetails endpoint:
we can immediately work on tenant-scoping the endpoint, with the idea to resolve the blockers above in the future.
Jira issue: CRDB-20662
Epic CRDB-16704
Is your feature request related to a problem? Please describe.
Part of: #89429
Blockers: #82879, #90267
As part of our effort to migrate to a multi-tenant architecture, we need to ensure our existing database details endpoint is tenant-scoped.
Unfortunately, the
DatabaseDetailsendpoint makes use of two functions that block our ability to scope to tenants:getDatabaseTableSpans->generateTableScan:generateTableScandoes not decode with the proper tenant prefix, instead usingTODOSQLCodec. There is an issue filed for this already: server: the TableDetails, TableStats, DatabaseDetails API don't decode with a proper tenant prefix #82879, which will need to be resolved to unblock this issue.getDatabaseStats->statsForSpan:statsForSpanmakes use of the KV layer which tenants will not have access to, there is an issue filed for this already: server: tenant span stats for TableStats, TableDetails & DatabaseDetails endpoints #90267 which will need to be resolved to unblock this issue.To maintain all information we provide currently, the blockers above would need to be resolved to allow the endpoint to be tenant-scoped.
Alternatively, If we choose to initially omit database statistics from the
DatabaseDetailsendpoint:cockroach/pkg/server/admin.go
Line 519 in 669e9a5
we can immediately work on tenant-scoping the endpoint, with the idea to resolve the blockers above in the future.
Jira issue: CRDB-20662
Epic CRDB-16704