Skip to content

[BE] Use Member timezone when tracking

Summary

When updating Members#last_activity_on, we prevent multiple updates for the same user/group combination for the rest of the day by creating a lease (in Redis) until midnight (UTC).

During a recent .com incident it was noted (internal slack) that this means that at midnight UTC we are at risk of having a bunch of new updates flood in.

Proposal

As noted in the linked thread above, it was suggested that perhaps we can use the user's timezone for this lease instead, i.e. preventing another activity tracking until midnight for the user.

  1. Verify this approach will work with our dormant member requirements
  2. Implement the change

Refs gitlab-com/gl-infra/production#18397 (comment 2045384701)

Edited by Vijay Hawoldar