Cap merge train refresh passes at a time budget

What does this MR do and why?

A slow merge train refresh can outlive RefreshWorker's 10-minute deduplication TTL, so later refresh jobs miss the lease and their events are dropped.

This MR stops a pass once it has run for five minutes and acted on at least one car, then enqueues another, behind the merge_trains_refresh_time_budget flag. RefreshWorker logs cars_processed and deferred for each run, so the rollout shows how often trains hit the budget.

References

How to set up and validate locally

Enable the flag, set MergeTrains::RefreshService::TIME_BUDGET to 0, and fail the first car's pipeline on a merge train. Each RefreshWorker run handles one car and enqueues the next.

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.

Edited by Hordur Freyr Yngvason

Merge request reports

Loading
Loading