Skip LostNodeEvent when all search nodes are lost
What does this MR do and why?
Skip LostNodeEvent when all search nodes are lost
Prevents firing LostNodeEvent when all Zoekt search nodes are lost to avoid unnecessary event processing. The check now ensures that at least one online search node exists before triggering the lost node handling workflow.
References
Closes #577888
Screenshots or screen recordings
Not applicable - backend logic change only.
How to set up and validate locally
- Set up Zoekt nodes in your development environment
- Run the scheduling service task:
Search::Zoekt::SchedulingService.execute!(:lost_nodes_check) - Verify that when all nodes are marked as lost, no
LostNodeEventis published - Run the test suite to validate the logic:
bin/rspec ee/spec/services/search/zoekt/scheduling_service_spec.rb --example "lost_nodes_check"
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.