-
Notifications
You must be signed in to change notification settings - Fork 91
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
Lazy connection pool - pipeline issue #90
Comments
Modeled after how transactions are handled. When a pipeline starts it was not getting removed from the ConnectionPool, and so if you make enough requests to cycle through your ConnectionPool before the pipeline executes you could end up sticking non-pipeline requests in a pipeline unintentionally.
Hmmm, that's odd. I was not able to reproduce this on my machine (using the HEAD of master on fiorix/txredisapi. I tried setting the poolsize to 1, 2, and 10, having an empty set at The deferedQueue (https://github.com/fiorix/txredisapi/blob/3834aeee670720c807c0de9a220a76aa984a303e/txredisapi.py#L2051) should block if we try to get a connection and none are available (https://github.com/fiorix/txredisapi/blob/3834aeee670720c807c0de9a220a76aa984a303e/txredisapi.py#L2104-L2116). |
@steiza I was testing my test case with 1.3 branch code of tx-redis api which do not have the pool fix you did. Then I thought this would be an issue with the pipeline - pool combination. |
I also witness this behavior in my applications when I have a burst of redis activity, it causes pauses in the rest of my program. I did not expect such behavior. I am still investigating it. We're running txredisapi version 1.4.3 |
I believe that This doesn't excuses deadlocks though. And if the problem is really in txredisapi code, it may affect |
txredisapi ( trying the master branch which has the fix for pipeline pool) hangs when there are greater number of concurrent pipeline commands executed than the maximum connection pool size.
How to reproduce :
1- Create lazyConnectin pool with pool size 2
2- Execute any more than 10 pipeline requests
Simple sample code to reproduce above is added below. The code should output all the 100 requests but it outputs only around 60.
The text was updated successfully, but these errors were encountered: