Move indices_to_evict_check to process one batch
What does this MR do and why?
This MR moves indices_to_evict_check
task in the Search::Zoekt::SchedulingService
to process one batch at a time:
- emit an event with no index ids
-
Search::Zoekt::IndexToEvictEventWorker
worker reads in 1 batch of 1000 indexes -
Search::Zoekt::NodeWithNegativeUnclaimedStorageEventWorker
now updates indiceswatermark_level
tocritical_watermark_exceeded
and emits an event with no index ids
References
Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
N/A
How to set up and validate locally
- enable zoekt for gdk
- setup some indices manually with:
watermark_levels
=critical_watermark_exceeded
- tail the background jobs log:
gdk tail rails-background-jobs
- run the scheduling service task:
Search::Zoekt::SchedulingService.execute(:indices_to_evict_check)
- verify that the replicas are deleted for the indices
- manually set nodes with negative unclaimed storage bytes
- run the scheduling service task:
Search::Zoekt::SchedulingService.execute(:node_with_negative_unclaimed_storage_bytes_check)
- verify that the indices records are updated to
watermark_levels
=critical_watermark_exceeded
- verify that the replicas are deleted when the emitted event is processed
Edited by Terri Chu