Skip to content

Reset Session for Reserved Connection when the connection id is not found#7539

Merged
systay merged 1 commit intovitessio:masterfrom
planetscale:fix-rc
Feb 23, 2021
Merged

Reset Session for Reserved Connection when the connection id is not found#7539
systay merged 1 commit intovitessio:masterfrom
planetscale:fix-rc

Conversation

@harshit-gangal
Copy link
Copy Markdown
Member

@harshit-gangal harshit-gangal commented Feb 23, 2021

Description

When is connection is marked as reserved and not in transaction. If the connection remains ideal for 30 secs (default). It is killed in vttablet, but the VTGate session does not clear this information.

When the user hits a query on the same session, if the error returned from vttablet is transaction x ended at ... then VTGate handles this error and recreate the connection with the right properties.
But if it received transaction x not found then it is not handled and the session is not usable.

The current change handles this scenario as well.

Related Issue(s)

Checklist

  • Should this PR be backported?
  • Tests were added or are not required
  • Documentation was added or is not required

Deployment Notes

Impacted Areas in Vitess

Components that this PR will affect:

  • Query Serving

…e session

Signed-off-by: Harshit Gangal <harshit@planetscale.com>
@deepthi
Copy link
Copy Markdown
Collaborator

deepthi commented Feb 23, 2021

💯 for writing 50 lines of tests for a 1-line fix 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants