Semantic Code Search: debounce push-triggered (incremental) indexing
What does this MR do and why?
Currently, pushes to the default branch immediately enqueues RepositoryIndexWorker through perform_async. Because the worker has deduplicate :until_executing and incremental indexing can run very quickly, a series of pushes often runs indexing once per push.
In this MR, we introduce a 2 minute delay for enqueuing RepositoryIndexWorker triggered from branch pushes. The worker's existing deduplication logic then folds pushes that arrive before the run starts into one indexing run. The delay is only applied in SaaS for now. Later on, we may introduce this to Self-Managed instances with configurable settings.
For the rationale behind the 2 minutes delay, please see https://gitlab.com/gitlab-org/gitlab/-/work_items/635319#note_4095876620.
This MR is behind a feature flag: active_context_code_push_indexing_delay
References
Screenshots or screen recordings
N/A
How to set up and validate locally
N/A - tests should cover validation
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.
Related to #635319