-
Notifications
You must be signed in to change notification settings - Fork 992
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow auto flushing control on connection pool #162
Comments
TBH, connection pooling is not the best feature of lettuce. There are various ways how to deal with connection pooling and how users want to use pooling hence my strategy is to support Redis as good as possible but leave pooling up to the user. |
Fair enough, that is reasonable. There are various ways for me to bypass the protection, so thats not an issue for me. Another option would be that I can provide my own connection factory for the pool, so i can control the intitial state of a connection. This is currently not doable because of visibility. |
You mean to make |
Maybe hook into here: |
I'd rather allow the state-changing commands than modify the API. Gives more responsibility to the user and would solve your case. |
Thats up to you, I just wanted to present my use case. Feel free to implement it any way or not do it at all. Thanks for your work on this nice library! |
Thanks for pointing this out. Not (yet) convinced to fully removing pooling. |
I never suggested to remove pooling? I suggested to make it possible to modify the state of a pooled connection, either at creation or usage time |
All good, sorry for confusing you. The leaky pooling implementation comes just more often across my way and I need to do something about it. |
The commands |
I am curious why autoflush control is not allowed on a pooled connection.
Is it to safeguard agains unexpected auto flush modes on the pooled connection?
In our use case we would like to use a pool of connections, but all usage actually is async and even further all usage is actually to "fire and forget". so we would prefer use manual flushing because the code using a pooled connection will perform a number of batched queries.
Would there be any actual problems in doing so?
The text was updated successfully, but these errors were encountered: