Revert reverted dbconn migration commits
Created by: eseliger
This PR contains three commits:
- The two revert commits for un-reverting the revert
- And a fix commit, that (likely) solves the problem we encountered on Sourcegraph.com
tl;dr: The defaultRepos query can be very slow and we didn't share the cache between invocations. I want to properly fix this, but will do that in a follow-up PR. Larger write-up and incident log content follows once I'm done :)
Please review the ops incident log entry for more details on this.
Collaborated with @mrnugget on this. Huge thanks to you!