gitlab-ce: create pool around parent project when forking
If allowed (see below), set up a pool around the parent project when forking. Not needed if the parent already has a pool.
- SQL: create pool object (this issue)
- Gitaly: PoolService::CreatePoolRepository gitaly#1346 (closed)
- SQL: link project to pool gitaly#1352 (moved)
- Gitaly: PoolService::LinkRepositoryToPool gitaly#1345 (closed)
- Gitaly: PoolService::CleanPoolRepositoryPostCreate gitaly#1346 (closed)
This goal of this sequence of steps is that we don't get in trouble if we fail in the middle. Think about it yourself if you believe this to be true.
Pool repositories must be excluded from the garbage collection schedule. Pool repositories are the special repos that collect deduplicated objects. In the first iteration of object dedup, we must not run GC on them -- it would lead to data loss.
The pool creating behavior is gated on three conditions:
- Is the project public?
- Is the object deduplication feature enabled?
- Is the project using hashed storage?
Only if both are true will we create pools.
Edited by James Ramsay (ex-GitLab)