The events table should be pruned periodically
Currently the events
table is constantly filled with new data, but existing data is never removed. This results in this table growing for all eternity. For GitLab.com this table currently takes 39 GB of disk space.
Since there's no real need to keep events information around forever I propose the following:
- We document the upper limit for events, let's say 30 days
- We add a Sidekiq task that runs every day and removes all events older than 30 days
In case of GitLab.com this would result in the removal of 25 201 439 rows. UI wise there's nothing we need to do.