-
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
pgwire,server: clarify to SQL clients when they select the wrong tenant #96345
Conversation
Prior to this patch: ``` $ ./cockroach sql -d cluster:wo ERROR: server closed the connection. Is this a CockroachDB node? unexpected EOF ``` After this patch: ``` $ ./cockroach sql -d cluster:woo ERROR: service unavailable for target tenant (woo) SQLSTATE: 08000 HINT: Double check your "-ccluster=" connection parameter or your "cluster:" database name prefix. ``` Release note: None
491ff13
to
99d6592
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.
nice improvement! had one question
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @ecwall, @knz, and @stevendanna)
pkg/sql/pgwire/pre_serve.go
line 215 at r1 (raw file):
pgerror.Newf(pgcode.ConnectionException, "service unavailable for target tenant (%v)", tenantName), `Double check your "-ccluster=" connection option or your "cluster:" database name prefix.`)
would it be possible to get this error is someone were using our SNI routing feature? if so, this hint would be confusing, as they are not expected to provide a -c cluster
option in that case
I have drafted the following answer to your question:
now asking for serverless friends for confirmation |
@rafiss here's the response from Jeff - WDYT?
|
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 checking!
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @ecwall, @knz, and @stevendanna)
cheers! bors r=rafiss |
This PR was included in a batch that was canceled, it will be automatically retried |
Build failed (retrying...): |
Build succeeded: |
Fixes #92525.
Epic: CRDB-14537
Prior to this patch:
After this patch:
Release note: None