Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
shards: handle failed cached List for selectRepoSet
If we failed to List the repositories when loading a shard we would never search it due to selectRepoSet optimization. In practice this feels very rare to happen (only for logic error or disk corruption). However, in those cases we should surface these crashes searches by attempting to search the shard. Additionally I add logging so we can notice when this happens. I didn't add a metric since this is the sort of thing that I think is so rare we would never think to check the metric (but may notice logs). Note: I used the slightly tricky invariant that repos being nil means error. If the shard is actually empty (eg all repos tombstoned) then we still correctly apply the optimization. In practice having an empty shard shouldn't really happen so I'm open to just treating empty repos list as something we have to search.
- Loading branch information