Skip to content

Drop an unused index_namespaces_on_runners_token

What does this MR do and why?

Drops the index index_namespaces_on_runners_token on namespaces, which is no longer used.

We can see that the index has seen zero scans in the past month on any database:

image

https://thanos-query.ops.gitlab.net/graph?g0.expr=sum%20by%20(type)(rate(pg_stat_user_indexes_idx_scan%7Benv%3D%22gprd%22%2C%20type%3D%22patroni%22%2C%20indexrelname%3D%22index_namespaces_on_runners_token%22%7D%5B30d%5D))&g0.tab=0&g0.stacked=0&g0.range_input=1h&g0.max_source_resolution=0s&g0.deduplicate=1&g0.partial_response=0&g0.store_matches=%5B%5D

We can also see that the namespaces.runners_token column is not used at all, as runner tokens are encrypted:

gitlabhq_dblab=# select id from namespaces where runners_token is not null;
 id 
----
(0 rows)

See #425979 (closed) for more details.

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.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #425979 (closed)

Merge request reports

Loading