Closed kostya closed 6 years ago
i think it also should correct catch pool exceptions, and raise redis exceptions.
pool not means that it open all connections, but open new only when needed, and redis-server with timeout option, would just close not used for long.
Thanks again for this PR!
Regarding this comment:
in spec "test multiconcurrent execution", try to replace Redis::Pool with Redis, you will see many concurrent errors."
Yes, a Redis
object is not meant to be used concurrently, and is expected to produce errors when done so. This is similar to other database connections - they are stateful, and therefore should not be used concurrently.
What you have done with transparently checking connections in and out for individual Redis commands is very cool, I have haven't seen this idea before anywhere.
What do you think?
What you have done with transparently checking connections in and out for individual Redis commands is very cool, I have haven't seen this idea before anywhere.
This is works in Celluloid (https://github.com/celluloid/celluloid/wiki/Pools), also transparent execute command on background pool, while for you it looks like you just call method
Great! I am pulling your PR now.
in spec "test multiconcurrent execution", try to replace Redis::Pool with Redis, you will see many concurrent errors.