-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
VTGate StreamExecute rpc to return session as response #13131
Conversation
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
If a new flag is being introduced:
If a workflow is added or modified:
Bug fixes
Non-trivial changes
New/Existing features
Backward compatibility
|
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
@@ -144,7 +144,11 @@ func (sn *VTGateSession) StreamExecute(ctx context.Context, query string, bindVa | |||
// StreamExecute is only used for SELECT queries that don't change |
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.
Is this still true?
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.
// StreamExecute is only used for SELECT queries that don't change
// the session. So, the protocol doesn't return an updated session.
// This may change in the future.
For sure it has changed and this is the future :)
…on StreamExecute Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
d0b40fa
to
5203b73
Compare
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
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.
LGTM
…15) This is to accommodate the breaking API change from: vitessio/vitess#13131 Currently PlanetScale explicitly ignores these results so it doesn't break clients, so this is pre-emptively support the new rows.
Description
This PR fixes the issue with StreamExecute VTGate RPC response. It adds the VTGate Session to the response.
This fixes all the side effects caused by not returning the modified session.
The Session is sent as the last message on the stream after all the Query Results are sent. So, the last stream message will have QueryResult as nil and Session as not nil.
Any error that happened during the query phase will be sent only after sending the Session.
Note: This is not an issue if MySQL clients are used to connect to VTGate.
Related Issue(s)
Checklist
Deployment Notes