Add query to count registry online GC tasks that are overdue
Related to https://gitlab.com/gitlab-com/gl-infra/infrastructure/-/issues/14127.
We have added queries to count all rows in the registry online GC review tables (https://gitlab.com/gitlab-org/gitlab-exporter/-/merge_requests/151) and this MR expands on that with two new queries that count only rows whose review_after
timestamp is in the past. This allows us to monitor not only how many tasks exist in total but also how many are ready to be processed.
review_after
is indexed in both gc_manifest_review_queue
and gc_blob_review_queue
, so these queries will scale well.
I have a pending followup MR for chef: https://gitlab.com/gitlab-com/gl-infra/chef-repo/-/merge_requests/672
Related to https://gitlab.com/gitlab-com/gl-infra/infrastructure/-/issues/14304.