Skip to content

Prune web hook logs older than one month

Yorick Peterse requested to merge prune-web-hook-logs into master

What does this MR do?

This adds a Sidekiq worker that removes up to 50 000 web hook logs that are older than one month, per hour.

This worker works best with an index on web_hook_logs.created_at. Since this index is already being added as part of https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/20247 I have skipped adding one in this MR.

Why was this MR needed?

The web_hook_logs table currently grows indefinitely, and on GitLab.com already takes up 34 GB of space. By removing web hook logs older than one month we can remove an estimated 20 GB of data.

Screenshots (if relevant)

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

https://gitlab.com/gitlab-org/gitlab-ce/issues/46120

Edited by Yorick Peterse

Merge request reports