redis-rack
redis-rack copied to clipboard
Fixed a bug that ConnectionPool holds the same Redis client.
When pool_size or pool_timeout is passed as an option, Redis::Rack::Connection builds a ConnectionPool. ConnectionPool will execute a given block when there are not enough connections. However, since the calling store is cached in an instance variable, all connections held by the ConnectionPool are actually same objects.
It seems like something fatal would occur, but since there are no reports in the issues, maybe the existing implementation is no problem.
NOTE: This bug does not affect the following users:
- Users who specify
threadsafe: true. - Users who do not pass the
threadsafeoption. - Users who directly pass the pool as options, such as
{ pool: ConnectionPool.new(...) }.