Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJames Fargher <proglottis@gmail.com>2021-07-19 04:21:35 +0300
committerJames Fargher <proglottis@gmail.com>2021-07-19 04:21:35 +0300
commit8889cf5ab7374220b242b6e01c329aaaf9e56540 (patch)
treebbfe72e67062c52a586c967353db9a5a6fad5229 /doc
parent92a88050a5dc39aca38f3f683744c840c2fe3f04 (diff)
parentcef28835ac02a214e6eea698fdc858d03b03260c (diff)
Merge branch 'qmnguyen0711/add-docs-for-pack-objects' into 'master'
Add documentation for pack-object cache See merge request gitlab-org/gitaly!3636
Diffstat (limited to 'doc')
-rw-r--r--doc/design_pack_objects_cache.md31
1 files changed, 31 insertions, 0 deletions
diff --git a/doc/design_pack_objects_cache.md b/doc/design_pack_objects_cache.md
index c104380db..a44a67679 100644
--- a/doc/design_pack_objects_cache.md
+++ b/doc/design_pack_objects_cache.md
@@ -6,6 +6,37 @@ The purpose of this document is to give more insight into the design choices we
Please read the [administrator documentation for the pack-objects cache](https://docs.gitlab.com/ee/administration/gitaly/configure_gitaly.html#pack-objects-cache) if you are not already familiar with what it does or what it is for.
+Please read [Pack-objects cache for CI Git clones epic](https://gitlab.com/groups/gitlab-com/gl-infra/-/epics/372) for more information about Pack-objects cache.
+
+## High-level architecture
+
+```
+Gitaly (PostUploadPack) git-upload-pack gitaly-hooks Gitaly (PackObjectsHook) git-pack-objects
+------------+---------- -------+------- -----+------ -----------+------------ -------+--------
+ | fetch request | | | |
+ +------------------>| pack request | | |
+ | +------------->| gRPC request | |
+ | | +------------------>| pack request (miss) |
+ | | | +-------------------->|
+ | | | | |
+ | | | |<--------------------+
+ | | |<------------------+ packfile data |
+ | |<-------------+ gRPC response | |
+ |<------------------+ packfile data| | |
+ | fetch response | | | |
+ | | | | |
+------------+---------- -------+------- -----+------ -----------+------------ -------+--------
+Gitaly (PostUploadPack) git-upload-pack gitaly-hooks Gitaly (PackObjectsHook) git-pack-objects
+```
+
+The whole pack-objects cache path depends on
+[uploadpack.packObjectsHook](https://git-scm.com/docs/git-config#Documentation/git-config.txt-uploadpackpackObjectsHook)
+option. When upload-pack would run git pack-objects to create a packfile for a
+client, it will run `gitaly-hooks` binary instead. The arguments when calling
+`gitaly-hooks` includes `git pack-objects` at the beginning. This pattern is
+similar to how Gitaly handles Git hooks during a push (such as `pre-preceive`
+and `post-receive`).
+
## Problem scope
We designed this cache to solve a specific problem on GitLab.com: high