Skip to content

Remove the possibility to set redis_slot in known_events

Problem

When defining a Redis metric there is the optional possibility to define a redis_slot. This adds mental overhead. The original reasoning behind slots seems to be the possibility to migrate towards a Redis cluster, but it seems unlikely that this is going to be needed.

Proposal

Remove the possibility to define a redis_slot and use a default slot for all events.

Implementation Suggestion

  1. Remove custom redis_slot implementation from hll_redis_counter.rb (old code can be moved into migration to be reused there while providing isolation of migration code from application code)

  2. Add post deployment migration to (eg: Redis Post Deployment Migration)

    1. migrate keys from already completed days and weeks with https://redis.io/commands/renamenx/
    2. migrate not completed keys with https://redis.io/commands/pfmerge/ to new keys
  3. Update Documentation

Testing

Ensure related tests are updated and pipeline is passing

Edited by Carlo Catimbang