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

Enable applications to detect stalled connections during PRS #17668

Open
frouioui opened this issue Jan 30, 2025 · 0 comments · May be fixed by #17669
Open

Enable applications to detect stalled connections during PRS #17668

frouioui opened this issue Jan 30, 2025 · 0 comments · May be fixed by #17669
Labels
Component: Query Serving Type: Enhancement Logical improvement (somewhere between a bug and feature)

Comments

@frouioui
Copy link
Member

frouioui commented Jan 30, 2025

Description

When doing a PRS while sending queries to VTGate on an opened transaction, the application will be hit by several errors for a while until the situation resolves itself. In this situation, the application should close the connection and re-open a new one, which will be routed to the proper tablet. However, the errors we send back to the client are not always easy to distinguish. Having a single error code that allow clients to detect such situation would be great.

Current errors that applications can encounter are:

target: ks.0.primary: vttablet: rpc error: code = FailedPrecondition desc = wrong tablet type: PRIMARY, want: REPLICA or [] (errno 1105) (sqlstate HY000) during query: insert into vt_insert_test(id, msg) values 
target: ks.0.primary: vttablet: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp [::1]:6708: connect: connection refused" (errno 1105) (sqlstate HY000) during query: insert into vt_insert_test(id, msg) values (671, 'test 671')
target: ks.0.primary: tablet: cell:"zone1" uid:101 is either down or nonexistent (errno 1105) (sqlstate HY000) during query: insert into vt_insert_test(id, msg) values (1103, 'test 1103')
@frouioui frouioui added Type: Enhancement Logical improvement (somewhere between a bug and feature) Component: Query Serving labels Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Query Serving Type: Enhancement Logical improvement (somewhere between a bug and feature)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant