indexserver: add IndexConcurrency for concurrent index jobs (#390)
This is a tunable which we only expect to be used when bootstrapping a
large number of repos to be indexed. The previous commit introduced some
concurrency control to prevent processing the same repository
concurrently. This allows us to naively spin up N goroutines to process
the queue. Note: the queue already contains concurrency control.
Now what is needed is some better observability around what is currently
being processed / etc. The net/trace instrumentation does expose this,
but we need something smoother if we polish up this feature.
Meta: The amount of copy paste to add a new variable is a bit of a
smell, but we can address that in a later commit.
Test Plan: go test. Manually start up a fresh instance with 10s of repos
to index and observe concurrent indexing.
plz-review-url: https://plz.review/review/6342