Draft: Switch to go-redis client
What does this MR do and why?
This MR replaces gomodule/redigo
with redis/go-redis
.
Addresses #413151 (closed)
Some notable areas of change
- Retained all files in
internal/redis
. Minor adjustments toWatchKey
method signature and make a bunch of constants/variables public for re-use. - Added code into
internal/goredis
, retaining at keywatcher's logic and tests - updated
main.go
to switch betweengoredis. NewKeyWatcher
andredis. NewKeyWatcher
viaGITLAB_WORKHORSE_FF_GO_REDIS_ENABLED
envvar
Points to note on goredis implementation:
- no more dialers, instead
go-redis
internal handles dialing- note that connections in
Pubsub
are not part of theClient
's pool (the restriction byPoolSize
applies only when running commands onredis.Client
, e.g.GET
commands)
- note that connections in
- running specs against a Redis instance in CI via
config.toml
(#413151 (comment 1478866105))
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Sylvester Chin