Skip to content

Fix reserved connection in autocommit mode on DML#6748

Merged
deepthi merged 2 commits intovitessio:masterfrom
planetscale:reservedconn-autocommit
Sep 21, 2020
Merged

Fix reserved connection in autocommit mode on DML#6748
deepthi merged 2 commits intovitessio:masterfrom
planetscale:reservedconn-autocommit

Conversation

@harshit-gangal
Copy link
Copy Markdown
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
Copy Markdown
Collaborator

@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