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

Use condition handlers to immediately rollback on lock timeouts inside the stored proc #313

Closed
jamadden opened this issue Aug 8, 2019 · 1 comment · Fixed by #314
Closed

Comments

@jamadden
Copy link
Member

jamadden commented Aug 8, 2019

If we'd already taken some locks and then later get a lock error, only the statement that got the error is rolled back (I think this only applies to the readcurrent case). The other locks are kept until the transaction is rolled back. But if the client is busy, that could take some time. We should catch and handle that in the proc and immediately roll back.

MySQL condition handlers can't do much so the code will be ugly, and we'll have to explicitly SIGNAL to "reraise" the exception, I think.

See also #310.

@jamadden
Copy link
Member Author

jamadden commented Aug 8, 2019

The final commit lock effectively isn't allowed to timeout, so this only applies to the object locks.

jamadden added a commit that referenced this issue Aug 8, 2019
This addresses part of #310.

Make MySQL clean up its locks by rolling back the transaction in the stored proc. This fixes #313.
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.

1 participant