Skip to content

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

@knz

Description

@knz

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:

  • SQL list of sessions & queries, and cancellation
  • KV-level table size on disk

cc @jordanlewis

Jira issue: CRDB-3176

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-authenticationPertains to authn subsystemsA-cli-serverCLI commands that pertain to CockroachDB server processesA-server-architectureRelates to the internal APIs and src org for server codeA-server-networkingPertains to network addressing,routing,initializationC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.T-server-and-securityDB Server & SecurityX-nostaleMarks an issue/pr that should be ignored by the stale bot

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions