Add number_of_replicas to zoekt enabled namespaces
What does this MR do and why?
Adds zoekt application setting for default number of zoekt replicas and a database column for overrides to control how many replicas are associated with a zoekt enabled namespace.
AI Summary
This change adds a new feature to control how many backup copies (replicas) of search data are created for different namespaces in GitLab's search system called Zoekt.
The update introduces a global default setting that administrators can configure to specify how many replicas should be created by default. Additionally, it allows individual namespaces to override this default with their own specific number of replicas if needed.
The implementation includes database changes to store the override values, updates to the application settings to manage the global default, and new logic to determine which replica count to use (either the namespace-specific override or the global default). Tests were also added to ensure the feature works correctly.
This gives administrators more flexibility in managing search performance and redundancy across different parts of their GitLab instance, allowing them to balance resource usage with reliability needs on a per-namespace basis.
References
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.