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

Fix reserved connection in autocommit mode on DML #6748

Merged
merged 2 commits into from
Sep 21, 2020

Conversation

harshit-gangal
Copy link
Member

@harshit-gangal harshit-gangal commented Sep 19, 2020

Issue:
If there is any session system variable settings applied on Vitess which needs to be handled through reserved connection.
Then a followed up dml can fail with error
BUG: SafeSession.AppendOrUpdate: unexpected autocommit state
This happens because the reserved connection is not short lived and needs to be stored in shard session so the same connection be used for future queries for the current session which have the applied system settings.

Signed-off-by: Harshit Gangal <harshit@planetscale.com>
@harshit-gangal harshit-gangal modified the milestones: v8.0, v7.0.2 Sep 19, 2020
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Copy link
Member

@deepthi deepthi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@deepthi deepthi merged commit 54ad151 into vitessio:master Sep 21, 2020
deepthi added a commit that referenced this pull request Sep 21, 2020
[Backport] Fix reserved connection in autocommit mode on DML #6748
@deepthi deepthi removed this from the v7.0.2 milestone Sep 21, 2020
@askdba askdba added this to the v8.0 milestone Oct 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants