forked from rails/rails
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Translate Trilogy syscall errors as conn failed
At GitHub we get a fair number of Trilogy `ETIMEDOUT` errors (for known reasons that we might be able to improve somewhat, but I doubt we'll make them go away entirely). These are very much retryable network errors, so it'd be handy if these `ETIMEDOUT` errors were translated to `ConnectionFailed` instead of `StatementInvalid`, making them `retryable_connection_error`s. https://github.com/rails/rails/blob/ed2bc92b82ddc111150cdf48bb646fd97b3baacb/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb#L1077 We're already translating `ECONNRESET` (via matching on the error message) and `EPIPE` to `ConnectionFailed`. Rather than adding another case, this commit treats all of the Trilogy `SystemCallError` subclasses as `ConnectionFailed`. This requires bumping trilogy 2.7 so we can get trilogy-libraries/trilogy#143
- Loading branch information
1 parent
776626f
commit 69b7fb3
Showing
2 changed files
with
36 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters