Skip to content

Prepare removal of old issue trigram indexes

Heinrich Lee Yu requested to merge remove-issues-trigram-indexes-async into master

What does this MR do and why?

Related to #364556 (closed)

English searches now use the full-text search index in issue_search_data, while non-english searches use the partial index added in !102962 (merged)

Looking at https://thanos-query.ops.gitlab.net/graph?g0.expr=sum(rate(pg_stat_user_indexes_idx_tup_read%7Benv%3D%22gprd%22%2C%20indexrelname%3D%22index_issues_on_description_trigram%22%2C%20type%3D%22patroni%22%7D%5B5m%5D))&g0.tab=0&g0.stacked=0&g0.range_input=1w&g0.max_source_resolution=0s&g0.deduplicate=1&g0.partial_response=0&g0.store_matches=%5B%5D / https://thanos-query.ops.gitlab.net/graph?g0.expr=sum(rate(pg_stat_user_indexes_idx_tup_read%7Benv%3D%22gprd%22%2C%20indexrelname%3D%22index_issues_on_title_trigram%22%2C%20type%3D%22patroni%22%7D%5B5m%5D))&g0.tab=0&g0.stacked=0&g0.range_input=1w&g0.max_source_resolution=0s&g0.deduplicate=1&g0.partial_response=0&g0.store_matches=%5B%5D, I still see some reads happening on this index. I'm not sure where these are coming from but I think it is still safe to remove this index.

This is a very low usage index anyway and those queries that use this index actually time out. That's why we use a CTE in project / group-level searches to avoid this index. This trigram index is only used in global-level searches, and only for non-english search terms because english ones already use the full-text index.

MR acceptance checklist

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

Edited by Heinrich Lee Yu

Merge request reports

Loading