elixir-ecto / db_connection

Database connection behaviour
http://hexdocs.pm/db_connection/DBConnection.html
309 stars 112 forks source link

Disconnect when can't handle unexpected transaction status #105

Closed fishcakez closed 6 years ago

fishcakez commented 6 years ago

Disconnect when transaction function returns unexpected status unless a commit can be turned into rollback.

The worst situation here is that a begin returns that the connection status is :transaction and we used to return it to the pool. Therefore the connection would get stuck in transaction status.