cockroachdb / cockroachdb/cockroach

server,sql: Remove `OptionalNodesStatusServer` usage from `crdb_internal.kv_{node_status,store_status}`

Open
#128,887 1 comment 0 reactions 0 assignees View on GitHub
C-enhancement T-db-server
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

**Describe the problem**

As part of https://github.com/cockroachdb/cockroach/issues/100826, we are removing usages of `OptionalNodesStatusServer`.

**To Reproduce**

Current behavior:
For secondary tenants:
```
demo@127.0.0.1:26257/demoapp/movr> select * from crdb_internal.kv_node_status;
ERROR: unimplemented: operation is unsupported within a virtual cluster
SQLSTATE: 0A000
HINT: You have attempted to use a feature that is not yet implemented.
See: https://go.crdb.dev/issue-v/54252/v24.2
```

For system tenants, it works (can't paste the output, it prints a ton).

**Approach**

If we want to limit the usage to system tenants only, we can use `codec.ForSystemTenant` and return a more user-friendly message, similar to what we do for `show virtual clusters`:
```
ERROR: only the system tenant can show other tenants
SQLSTATE: 42501
HINT: Connect to the system interface and manage tenants from there.
```

On the other hand, if we want secondary tenants to use this feature as well, we might need to build some connector or bridge.

Jira issue: CRDB-41258

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.