Skip to content

Commit

Permalink
Check for transaction before invalidating the state
Browse files Browse the repository at this point in the history
  • Loading branch information
nvasilevski committed Nov 10, 2022
1 parent dcc75f9 commit e4b4c50
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -1012,7 +1012,7 @@ def invalidate_transaction(exception)
return unless exception.is_a?(TransactionRollbackError)
return unless savepoint_errors_invalidate_transactions?

current_transaction.state.invalidate! if current_transaction
current_transaction.state.invalidate! if current_transaction.open?
end

def retryable_query_error?(exception)
Expand Down

0 comments on commit e4b4c50

Please sign in to comment.