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

Add new error class `StatementTimeout` which will be raised when statement timeout exceeded #31129

Merged
merged 1 commit into from Nov 13, 2017

Conversation

Projects
None yet
2 participants
@kamipo
Member

kamipo commented Nov 11, 2017

We are sometimes using The MAX_EXECUTION_TIME hint for MySQL depending
on the situation. It will prevent catastrophic performance down by wrong
performing queries.

The new error class StatementTimeout will make to be easier to handle
that case.

https://dev.mysql.com/doc/refman/5.7/en/optimizer-hints.html#optimizer-hints-execution-time

Add new error class `StatementTimeout` which will be raised when stat…
…ement timeout exceeded

We are sometimes using The MAX_EXECUTION_TIME hint for MySQL depending
on the situation. It will prevent catastrophic performance down by wrong
performing queries.

The new error class `StatementTimeout` will make to be easier to handle
that case.

https://dev.mysql.com/doc/refman/5.7/en/optimizer-hints.html#optimizer-hints-execution-time

@kamipo kamipo added the activerecord label Nov 12, 2017

@kamipo kamipo merged commit a968a76 into rails:master Nov 13, 2017

2 checks passed

codeclimate All good!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@kamipo kamipo deleted the kamipo:add_statement_timeout_exception branch Nov 13, 2017

@jeremy

This comment has been minimized.

Member

jeremy commented Nov 13, 2017

Yes!

kamipo added a commit to kamipo/rails that referenced this pull request Nov 25, 2017

Rename `TransactionTimeout` to more descriptive `LockWaitTimeout`
Since rails#31129, new error class `StatementTimeout` has been added.
`TransactionTimeout` is caused by the timeout shorter than
`StatementTimeout`, but its name is too generic. I think that it should
be a name that understands the difference with `StatementTimeout`.

kamipo added a commit that referenced this pull request Nov 27, 2017

Rename `TransactionTimeout` to more descriptive `LockWaitTimeout` (#3…
…1223)

Since #31129, new error class `StatementTimeout` has been added.
`TransactionTimeout` is caused by the timeout shorter than
`StatementTimeout`, but its name is too generic. I think that it should
be a name that understands the difference with `StatementTimeout`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment