jawj / zapatos

Zero-abstraction Postgres for TypeScript: a non-ORM database library
https://jawj.github.io/zapatos/
Other
1.3k stars 46 forks source link

Fix transactions returning bad connections to the pool #119

Open jfrconley opened 2 years ago

jfrconley commented 2 years ago

Currently, errors in transactions do not get propagated to the pool. This means failed connections will get returned to the pool, effectively poisoning the well. This change simply passes exceptions back to the pool when they occur, allowing the connection to be dropped.

@jawj

john-trashlab commented 1 year ago

@jfrconley I'm curious what the impact of this bug/fix is. Can you elaborate?

jawj commented 1 year ago

I'm sorry to see I never responded to this. @jfrconley Is there any chance you could put together a simple test case that demonstrates the problem and how your patch solves it?