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

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

Open
shubhamdhama opened this issue Aug 13, 2024 · 1 comment
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-db-server

Comments

@shubhamdhama
Copy link
Contributor

shubhamdhama commented Aug 13, 2024

Describe the problem

As part of #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

@shubhamdhama shubhamdhama added the C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. label Aug 13, 2024
Copy link

blathers-crl bot commented Aug 13, 2024

Hi @shubhamdhama, please add branch-* labels to identify which branch(es) this C-bug affects.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@shubhamdhama shubhamdhama added T-db-server C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) and removed C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. labels Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-db-server
Projects
None yet
Development

No branches or pull requests

1 participant