redis-rack icon indicating copy to clipboard operation
redis-rack copied to clipboard

Fixed a bug that ConnectionPool holds the same Redis client.

Open alpaca-tc opened this issue 1 year ago • 0 comments

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 threadsafe option.
  • Users who directly pass the pool as options, such as { pool: ConnectionPool.new(...) }.

alpaca-tc avatar Sep 26 '24 09:09 alpaca-tc