Add expiration timeout to total count Redis keys for internal events
What does this MR do and why?
Related to #433502 (closed).
This adds an expiration timeout of 6 weeks to total count metrics' Redis keys for internal events. We don't want to keep them in perpetuity, because they're not used after 5 weeks and are a waste of storage beyond that point.
An expiration timeout is only added when one doesn't already exist (handled by setting an NX option). Turns out I can't exactly do that, because we need to support Redis 6.2, so this uses ttl to check if an expiration timeout exists on the key.
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
Numbered steps to set up and validate the change are strongly suggested.