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 `QueryCanceled` which will be raised when canceling statement due to user request #31235

Merged
merged 1 commit into from Nov 27, 2017

Conversation

Projects
None yet
2 participants
@kamipo
Member

kamipo commented Nov 27, 2017

This changes StatementTimeout to QueryCanceled for PostgreSQL.

In MySQL, errno 1317 (ER_QUERY_INTERRUPTED) is only used when the
query is manually cancelled.

But in PostgreSQL, QUERY_CANCELED error code (57014) which is used
StatementTimeout is also used when the both case. And, we can not tell
which reason happened.

So I decided to introduce new error class QueryCanceled closer to the
error code name.

Add new error class `QueryCanceled` which will be raised when canceli…
…ng statement due to user request

This changes `StatementTimeout` to `QueryCanceled` for PostgreSQL.

In MySQL, errno 1317 (`ER_QUERY_INTERRUPTED`) is only used when the
query is manually cancelled.

But in PostgreSQL, `QUERY_CANCELED` error code (57014) which is used
`StatementTimeout` is also used when the both case. And, we can not tell
which reason happened.

So I decided to introduce new error class `QueryCanceled` closer to the
error code name.

@kamipo kamipo merged commit 0e2cd3d into rails:master Nov 27, 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_query_canceled_exception branch Nov 27, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment