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

newConn race fix, fix check pool exhausted, replacing the MaxActiveConns parameter with PoolSizeStrict

Open nvorobev opened this issue 1 year ago • 2 comments

This library implements non-standard pool behavior. Where the pool size is essentially not an honest pool size and can increase without limitation, which under heavy loads will lead to the server being flooded with connections.

PoolSizeStrict - enabling classic pool mode, when it is guaranteed that no more connections will open to the server than specified in PoolSize.

An example of classic pool behavior:

https://github.com/gomodule/redigo/blob/master/redis/pool.go#L147C1-L147C1

https://github.com/gomodule/redigo/blob/master/redis/pool.go#L247

nvorobev avatar Nov 01 '23 13:11 nvorobev

@nvorobev Could you please add unit tests for this issue?

ofekshenawa avatar Dec 17 '23 10:12 ofekshenawa