Skip to content

Make it possible to add overrides for RedisHLL keys

Michał Wielich requested to merge michold-redis-key-replacement into master

What does this MR do and why?

Related to #415139 (closed)

Make it possible to add overrides for RedisHLL keys. We want this on master for both the linked issue and Redis total count update, as discussed here.

This should not change any of the existing logic, but build fundamentals for future MRs.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

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

Make sure that everything works like it did:

  1. Choose a RedisHLL event name and try reading its value, for example: Gitlab::UsageDataCounters::HLLRedisCounter.unique_events(event_names: 'g_compliance_dashboard', start_date: Date.yesterday, end_date: Date.tomorrow + 7.days)
  2. Try triggering the chosen event, for example: Gitlab::UsageDataCounters::HLLRedisCounter.track_event('g_compliance_dashboard', values: SecureRandom.uuid)
  3. Read the event's value again using the command from point 1, eg: Gitlab::UsageDataCounters::HLLRedisCounter.unique_events(event_names: 'g_compliance_dashboard', start_date: Date.yesterday, end_date: Date.tomorrow + 7.days). Its value should be equal to the value retrieved in point 1, incremented by 1 for each time #track_event has been called.
Edited by Michał Wielich

Merge request reports