cockroachdb / cockroach

CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
https://www.cockroachlabs.com
Other
30.1k stars 3.81k forks source link

sql: improper dependency on the RPC servers from SQL #60584

Open knz opened 3 years ago

knz commented 3 years ago

This came up while reviewing #59604 and also investigating #59998

There are multiple places in the SQL code where there is an abstraction inversion: the SQL code calls into RPC endpoints in the server package, which are not intended for use directly by SQL.

In particular, these RPC endpoints are not yet defined for SQL-only servers, which occur in multi-tenant deployments.

The proper way forward is to define a separate "sub-service" API inside the SQL package, which depends only on the client-side KV API, and not dependent on the server machinery, and also is guaranteed to be available in SQL-only pods of multi-tenant deployments.

Systems affected:

cc @jordanlewis

Jira issue: CRDB-3176

github-actions[bot] commented 1 year ago

We have marked this issue as stale because it has been inactive for 18 months. If this issue is still relevant, removing the stale label or adding a comment will keep it active. Otherwise, we'll close it in 10 days to keep the issue queue tidy. Thank you for your contribution to CockroachDB!

knz commented 1 year ago

still very much relevant!