-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
sql: handle no cluster_inflight_traces table on tenants #72825
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @aliher1911)
pkg/sql/crdb_internal.go, line 1293 at r1 (raw file):
if traceCollector == nil { // Tenant nodes doesn't have trace collector so can't serve this table. return false, pgerror.New(pgcode.UndefinedTable, "table crdb_internal.cluster_inflight_traces does not exist")
The error can be confusing, especially if the table shows up in internal catalogs. I would check !planner.ExecCfg().Codec.ForSystemTenant
instead and emit an error saying this is not implemented for tenants.
32a7262
to
f610523
Compare
Or is it better to add the test to pkg/sql/logictest/testdata/logic_test/crdb_internal_tenant ? |
f610523
to
7a3f74c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this!
Previously query for traces under tenant will fail with NPE. This was happening because trace collector is not available and virtual table was not aware of the case. This patch adds handling of the table on tenant sql pods. Release note: None
7a3f74c
to
18ebda3
Compare
bors r=adityamaru |
Build succeeded: |
Previously query for traces under tenant will fail with NPE.
This was happening because trace collector is not available
and virtual table was not aware of the case.
This patch adds handling of the table on tenant sql pods.
Release note: None
Fixes #72564