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
When the future returned by Pool::acquire is cancelled, then depending on at which point it's cancelled, the connection being acquired might get dropped. This happens when the cancellation happens after the connection is removed from the internal queue but before it's returned to the caller - e.g. while it's being pinged.
This is normally not a problem as the pool can establish a new connection on the next call to acquire, but there is one use case when this becomes a problem: When using sqlite's in-memory databases - in this case the database is tied to the connection and so dropping the connection wipes out the whole database.
One possible solution to this would be to change Floating to return the connection back to the pool on drop, instead of just releasing the semaphore and dropping the connection. Not sure how hard would be to do this.
(Note this comment seems to suggest you guys are aware of this problem and plan to address it in the next version. So feel free to close this issue if it's a duplicate, however I haven't seen it reported after a quick search).
The text was updated successfully, but these errors were encountered:
When the future returned by
Pool::acquire
is cancelled, then depending on at which point it's cancelled, the connection being acquired might get dropped. This happens when the cancellation happens after the connection is removed from the internal queue but before it's returned to the caller - e.g. while it's beingping
ed.This is normally not a problem as the pool can establish a new connection on the next call to
acquire
, but there is one use case when this becomes a problem: When using sqlite's in-memory databases - in this case the database is tied to the connection and so dropping the connection wipes out the whole database.One possible solution to this would be to change
Floating
to return the connection back to the pool on drop, instead of just releasing the semaphore and dropping the connection. Not sure how hard would be to do this.(Note this comment seems to suggest you guys are aware of this problem and plan to address it in the next version. So feel free to close this issue if it's a duplicate, however I haven't seen it reported after a quick search).
The text was updated successfully, but these errors were encountered: