sourcegraph / sourcegraph-public-snapshot

Code AI platform with Code Search & Cody
https://sourcegraph.com
Other
10.11k stars 1.27k forks source link

gitserver: Move git repo update queue to Postgres #16671

Open tsenart opened 3 years ago

tsenart commented 3 years ago

Context

Currently we maintain an in-memory priority queue for git repo updates in repo-updater, which consumes each item in the queue and RPCs out to git-servers's repo-update endpoint.

https://github.com/sourcegraph/sourcegraph/blob/c4d2788b624461567855b134a7d38765d8f2c3f0/cmd/repo-updater/shared/main.go#L120

Proposal

In order to make repo-updater stateless, before we can sunset it, we should move this priority queue to Postgres, using the shared internal/workerutil package, and make gitserver itself consume this queue directly from Postgres.

github-actions[bot] commented 3 years ago

Heads up @tsenart - the "team/cloud" label was applied to this issue.