database: filter Repos.List by gitserver_repos.last_changed
Created by: keegancsmith
We recently introduced storing the LastChanged timestamp value in the gitserver_repos table. This is the last time a git fetch changed the contents of the repository. We want to filter against this value to make it possible to find all repositories which changed since a date.
In particular the timestamp will be used like a cursor so that zoekt-indexserver can poll only the repositories that have changed since the last time it polled.
Note: times are not reliable in distributed systems. However, we can request the last time - threshold to avoid races / minor differences in times on machines. Additionally the last_changed field will converge to reasonable values. Finally the indexserver will occasionally ask for everything over time to converge to potential missing values.