Implement cache invalidation correctly / the best way from the start?
#37 (comment 22350201) @pcarranza pointed something out that crossed my mind as well. The cache invalidation mechanism is a bit of a relay race.
Git client -{HTTP,SSH}-> git receive-pack -(subprocess)-> gitlab-shell/bin/post-receive -(HTTP POST)-> Unicorn -(gRPC)-> Gitaly
Ultimately, I would like that to look like:
Git client -{HTTP,SSH}-> Gitaly -> git receive-pack ; invalidate cache when subprocess finishes
The problem with the latter is that it requires more work up-front:
- forward HTTP POST /receive-pack to gitaly from workhorse
- forward git receive-pack SSH session to gitaly from gitlab-shell
Is having a more robust system early on worth the extra up-front work?
cc @andrewn