Cédric Krier pushed to branch branch/default at Tryton / Tryton


Commits:
f8aaf62a by Cédric Krier at 2023-08-04T15:59:35+02:00
Discard disconnected connection from the pool

When a connection in the pool is disconnected, it stays in the pool and it may
still be served.
Using such connection raise an OperationalError and so the request is retried
but before that the connection is put back to the pool. So we may get it back
again.
It is not possible to distinct between an OperationalError due to a
disconnection or due to a isolation error for example.
So with the current design of Transaction API, an OperationalError always put
back the connection to the pool.
This main that we can only ensure that the connections served are still
connected by executing a simple query. And close connections that are failing.

Closes #12452
- - - - -


1 changed file:

- trytond/trytond/backend/postgresql/database.py


View it on Heptapod: 
https://foss.heptapod.net/tryton/tryton/-/commit/f8aaf62a0c7508e3f3398e47dc2b86e6f8f06cc0

-- 
View it on Heptapod: 
https://foss.heptapod.net/tryton/tryton/-/commit/f8aaf62a0c7508e3f3398e47dc2b86e6f8f06cc0
You're receiving this email because of your account on foss.heptapod.net.


Reply via email to