Skip to content

Draft: Switch to go-redis client

Sylvester Chin requested to merge sc1-workhorse-go-redis into master

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 to WatchKey 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 between goredis. NewKeyWatcher and redis. NewKeyWatcher via GITLAB_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 the Client's pool (the restriction byPoolSize applies only when running commands on redis.Client, e.g. GET commands)
  • 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.

Edited by Sylvester Chin

Merge request reports

Loading