Connection, returned to pool, should not be usable
The following bug lived in our service for many month, once a few days producing strange error messages. I've even fixed a real bug in aiopg trying to figure out what is going on:
async with request.app["db"].acquire() as db:
await func1(db)
await func2(db)
Connection has been returned to pool, but is still being used outside of pool management logic. This can lead to various concurrency conflicts.
In my opinion, connections that are managed by the pool, should have some flag that either issues warning or raises exception that prevents using them this way. If community agrees, I can implement this and issue a pull-request.
I think it is good idea! asyncpg doing similar thing https://github.com/MagicStack/asyncpg/pull/99
Hello!
what about this issue? in version 1.0.0 this bug fixed?