Skip to content

Refactoring to prepare for async Redis I/O in tunnel registry

Mikhail Mazurskiy requested to merge ash2k/async-redis-io into master

Relates to #386 (closed).

This refactoring will make it easier to make further changes to the registry stripe to move redis I/O outside of mutex in the common case. That will be done in a follow up.

The idea here is that registry stripe assumes responsibility for tracking if there is at least one tunnel for a given agent id and, hence, URL of this kas instance needs to be present in the hash for the given agent id. Apart from that, another change is explicitly pipelining writes in Refresh().

  • Reimplement RedisTracker using ExpiringHashApi

  • Reimplement Scan() using ExpiringHashApi

  • Reimplement Unset() using ExpiringHashApi

  • Reimplement Refresh() using ExpiringHashApi builder. Issue a single pipelined request rather than rely on rueidis pipelining concurrent requests.

  • Reimplement Set() using ExpiringHashApi builder

  • Rename constructor

  • Rename types, no functional changes

  • Merge consts

  • Remove unused const

  • Move registration deduplication into registry stripe

Merge request reports