Non-retryable exceptions also break connection verification

This commit is contained in:
Matthew Draper 2022-06-17 03:36:50 +09:30
parent deec3004d8
commit fe2846a154

@ -958,9 +958,10 @@ def with_raw_connection(allow_retry: false, uses_transaction: true)
end
end
if retryable_connection_error?(translated_exception)
# There's a problem with the connection, but we couldn't attempt to
# reconnect. The connection is going to stay broken, so un-verify it.
unless retryable_query_error?(translated_exception)
# Barring a known-retryable error inside the query (regardless of
# whether we were in a _position_ to retry it), we should infer that
# there's likely a real problem with the connection.
@verified = false
end