Indexing pause framework
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=469502) </details> <!--IssueSummary end--> ## Background I believe that we need to start designing indexing pause framework to allow us to selectively pause indexing operations. ## Proposal We can start with something like: - document_type (blobs, issues) - alias_name/index_name This framework needs to be extendable so that we can eventually reach `project_id` granularity. The first use-case for this framework can be https://gitlab.com/gitlab-org/gitlab/-/issues/381705+ I think it should be a postgresql table. We can call it `advanced_search_pause_rules` | name | type | comment | | -------------------- | ----------- | ------------------------------------------------------------- | | `id` | `bigint` | `PRIMARY KEY` | | `rule` | `jsonb` | `NOT NULL` | | `created_at` | `timestamp` | `NOT NULL` | | `updated_at` | `timestamp` | `NOT NULL` | We then can cache all the rules based on `MAX(updated_at)` so that we don't need to read the table every time. <!-- Use this section to explain the feature and how it will work. It can be helpful to add technical details, design proposals, and links to related epics or issues. --> <!-- Please add a label for the type of maintenance as per https://about.gitlab.com/handbook/engineering/metrics/#work-type-classification -->
epic