Something went wrong on our end. Please try again.
Created by: mrnugget
This adds two statistics tables that are purely populated via database triggers:
repo_statistics
to hold information about the repo
table (that's why it's repo_statistics
and not repo*s*_statistics
, because consistency)gitserver_repos_statistics
to hold information about the gitserver_repos
tableBoth tables allow us to cheaply query the number of cloned, cloning, not_cloned, soft_deleted, etc. repositories in a sourcegraph instance and we can even see how many repos are on which gitserver.
See this discussion for background: https://sourcegraph.slack.com/archives/C018CJQ5YBB/p1657276718654509
https://user-images.githubusercontent.com/1185253/182858393-7b1b0d9e-b834-4a3d-bdbb-cc83a6dc62fb.mp4