Skip to content

repo-updater: Don't schedule all repos for update on startup

Warren Gifford requested to merge repo-updater-no-immediate-clone into main

Created by: ryanslade

With the recent change, fdc8858eb, to ensure that all indexed repos are known to the scheduler we inadvertently caused all indexed repos to be scheduled for update whenever repo-updater started.

Our old logic was that every 30 seconds we fetch all indexed repos and add them to the scheduler if they're not already known to it. The intention here is that the scheduler should know about all repos that need to be indexed so that it'll update them occasionally and ensure they are cloned, even after a gitserver rebalance.

The issue is that when this first runs all ~400k default repos are unknown to the scheduler and therefore added with the minimum update interval of 45 seconds.

Instead, we now first fetch the list of known cloned repos from gitserver and only add indexed repos to the scheduler if they are NOT in the cloned list.

Merge request reports

Loading