Closed piotrp closed 2 years ago
Hello @pintsized, just checking whether you remember about this ;)
@pintsized Any word on this. would like see this get landed
@pintsized Could we get this one published to luarocks?
@pintsized nudge on this one? possible to publish this to luarocks?
In #34 I added error handling in
connect
to properly handle errors after issuingSELECT
, with a workaround for Sentinels (link). This PR provides a better solution for Sentinels, so that problematicSELECT
call and subsequentROLE
aren't issued.I did this in a way that allows API to be fully compatible, i.e. old workaround is still there, but internally we avoid issuing invalid command to Sentinel unless user tries to use
connect("redis://sentinel-address")
. To remove this we would need to alter public APIs in some way:db = ngx.null
, and useSELECT
only whendb
is provided - which would make resetting DB to 0 not happen when TCP connection is reused, unless requested explicitly by user