You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The case: a connection is acquired from a pool, a request is made with this connection and fails, the connection is put back to the pool.
The connection is marked as broken in the case and will be discarded: a pool will not actually cache it, just count (<pool object>.queue:put(nil) under hood) that it may give (and create if needed) one more connection when it will be acquired. The math here looks correct. However an underlying raw connection of this 'broken' connection will not be closed neither when it put back to the pool, nor at GC (because the GC callback is removed at <pool object>:put() for both broken and healthy connections).
This behaviour looks as a bug. I propose to destroy the underlying connection when it is discarded at <pool object>:put(): i. e. close the underlying connection if it is broken.
We should test than the underlying connection is closed in the case.
The text was updated successfully, but these errors were encountered:
The case: a connection is acquired from a pool, a request is made with this connection and fails, the connection is put back to the pool.
The connection is marked as broken in the case and will be discarded: a pool will not actually cache it, just count (
<pool object>.queue:put(nil)
under hood) that it may give (and create if needed) one more connection when it will be acquired. The math here looks correct. However an underlying raw connection of this 'broken' connection will not be closed neither when it put back to the pool, nor at GC (because the GC callback is removed at<pool object>:put()
for both broken and healthy connections).This behaviour looks as a bug. I propose to destroy the underlying connection when it is discarded at
<pool object>:put()
: i. e. close the underlying connection if it is broken.We should test than the underlying connection is closed in the case.
The text was updated successfully, but these errors were encountered: