Fix feature categories in the Sidekiq routing rules example

What does this MR do?

The Sidekiq routing example sends feature_category=search jobs to a search queue. No worker has that feature category, so the rule never matches and the queue gets no jobs. Someone who copies the example to give search indexing its own pod gets a pod that stays idle, and the search jobs that are not CPU-bound run on the default pod.

This MR changes the rule to feature_category=global_search, which the search workers declare. The queue name search stays as it is.

It also drops feature_category=memory from the memory rule. No feature category is named memory, so the rule matched only on resource_boundary=memory, and that is now all it says.

flowchart TD
  J["Job: Search::Elastic::MetricsUpdateCronWorker<br/>feature_category: global_search<br/>resource_boundary: unknown"] --> C["Rule 1<br/>resource_boundary=cpu"]
  C -- "no match" --> P["Rule 2<br/>feature_category=pages"]
  P -- "no match" --> S["Rule 3"]
  S -- "feature_category=global_search<br/>(this MR): match" --> SP["search queue, search pod"]
  S -- "feature_category=search<br/>(before): no match" --> M["Rule 4<br/>memory rule"]
  M -- "no match" --> W["Rule 5<br/>*"]
  W -- "match" --> DP["default queue, default pod"]

Evidence

  • config/feature_categories.yml lists global_search (line 93) and has neither search nor memory, at v19.5.3-ee.
  • Search::Worker sets feature_category :global_search (app/workers/concerns/search/worker.rb:8), and Search::Elastic::CommitIndexerWorker includes it (ee/app/workers/search/elastic/commit_indexer_worker.rb:7).
  • The Advanced Search docs already route feature_category=global_search (doc/integration/advanced_search/elasticsearch.md:1344).
  • On a self-managed GitLab 19.5.3 install (chart 10.5.4) with cpu-boundary, search, memory-bound and default Sidekiq pods and the example's five rules:
    • As the example stands, Search::Elastic::CommitIndexerWorker and 65 other global_search workers route to default, and a Search::Elastic::MetricsUpdateCronWorker job ran in the default pod and left the search pod idle.
    • With this MR's rules, those 66 workers route to search, and a job of the same worker ran in the search pod. The 9 CPU-bound global_search workers route to cpu-boundary with the old and the new rules, because Rule 1 matches first.
    • The same 24 workers route to memory-bound with the old and the new memory rule.

global_search also covers the Zoekt and active context workers. With this rule in GitLab 19.5.3, all 33 Zoekt workers and 9 of the 14 active context workers move to the search pod. The other 5 active context workers are CPU-bound and route to cpu-boundary.

None.

Author's checklist

If you are only adding documentation, do not add any of the following labels:

  • ~"feature"
  • ~"frontend"
  • ~"backend"
  • ~"bug"
  • ~"database"

These labels cause the MR to be added to code verification QA issues.

Review checklist

Documentation-related MRs should be reviewed by a Technical Writer for a non-blocking review, based on Documentation Guidelines and the Style Guide.

  • As soon as you begin reviewing, select Start a review on your first comment so the MR shows Reviewer started review.
  • If the content requires it, ensure the information is reviewed by a subject matter expert.
  • Technical writer review items:
    • Ensure docs metadata is present and up-to-date.
    • Ensure the appropriate labels are added to this MR.
    • If relevant to this MR, ensure content topic type principles are in use, including:
      • The headings should be something you'd do a Google search for. Instead of Default behavior, say something like Default behavior when you close an issue.
      • The headings (other than the page title) should be active. Instead of Configuring GDK, say something like Configure GDK.
      • Any task steps should be written as a numbered list.
      • If the content still needs to be edited for topic types, you can create a follow-up issue with the docs-technical-debt label.
  • Review by assigned maintainer, who can always request/require the above reviews. Maintainer's review can occur before or after a technical writer review.
  • Ensure a release milestone is set.

An AI coding assistant wrote this change. The assistant also checked each claim against the GitLab source files cited above, ran Vale and markdownlint on the changed page on a local checkout of the chart repository, and ran the search rule's routing, before and after, and the memory rule's routing on a self-managed GitLab 19.5.3 instance (chart 10.5.4) on a test VM.

Merge request reports

Loading
Loading