Skip to content

Remove uncessary fields from pack-objects cache key computation

Quang-Minh Nguyen requested to merge qmnguyen0711/fix-invalidated-caches into master

For #5087 (closed), https://gitlab.com/gitlab-com/gl-infra/reliability/-/issues/23532

Gitaly has a caching layer in front of git-pack-objects commands. It uses a cache key computed from PackObjectsHookRequest and the list of requested objects from stdin of git clients. After pack-objects cache was introduced, we added some fields to that request object. The added fields are mostly user identity information. They are irrelevant to the output of git-pack-objects command. Hence, they are redundant while reducing the cache hit ratio significantly.

This problem was exposed after Propagate Correlation ID and Remote IP to and f... (!5578 - merged). Afterward, the cache hit/miss ratio decreased significantly:

image

This MR removes redundant fields to increase the cache hit ratio.

Merge request reports