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

VTGate does not rollback in-flight transactions when shut down #5553

Closed
mikrobi opened this issue Dec 12, 2019 · 3 comments · Fixed by #5659
Closed

VTGate does not rollback in-flight transactions when shut down #5553

mikrobi opened this issue Dec 12, 2019 · 3 comments · Fixed by #5659

Comments

@mikrobi
Copy link
Contributor

mikrobi commented Dec 12, 2019

We experience a bunch of

vttablet: rpc error: code = ResourceExhausted desc = transaction pool connection limit exceeded

errors each time we deploy VTGate. After discussing this problem in Slack @sougou noted that VTGate does not rollback in-flight transactions on shut down

To avoid leaving transactions unfinished in the tablet where they would linger until the transactions timeout, we probably want them to rollback once the lame duck period has expired?

/cc @drogart and @tomkrouper
/cc @dweitzman who might also be interested in this issue

@dweitzman
Copy link
Member

dweitzman commented Dec 12, 2019

As a note: this is specifically with the mysql protocol where a transaction happens on a single gate. It wouldn't be an issue with grpc, where gates are stateless and interchangeable (although the clients of the gates might fail to kill grpc transactions if those clients shut down ungracefully).

@drogart
Copy link
Contributor

drogart commented Dec 12, 2019

Very interesting!

So, the hypothesis is that in flight txns on a vtgate do not complete during the lame duck period, then get left hanging on the tablet and consume a connection pool slot?

I guess we can either:

  • bring the mysql protocol behavior in line with the grpc behavior
  • increase the lame duck period (though this will still leave a long tail of txns this could happen to)

Any other ideas to alleviate this?

@dweitzman
Copy link
Member

The useful behavior here would be for vtgate to roll back any in-progress mysql protocol transactions at the end of the lame duck period.

@morgo morgo added Type: Enhancement Logical improvement (somewhere between a bug and feature) Type: Bug and removed Type: Enhancement Logical improvement (somewhere between a bug and feature) labels Dec 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants