Move hg-git Git repositories out of Gitaly reach
In prepartion for GitLab switching to the reftable format, we need to put all the Git repositories that we will keep converting out of reach of the future Gitaly migration.
Ccurrently, these are the native projects having hg_legacy_git_conversion=true
, but later on, this will include repositories for fully-featured Git Push mirroring.
This means that a few basic operations will have to be reproduced without Gitaly:
- creation/deletion
- backup/restore
A good location could be +hgitaly/hg-git
, and we would reproduce the hashed storage structure inside there. Perhaps, to leave room in the future for several Git Push mappings, we could add a mirror number (defaulting to 0, of course).
At this point, making the conversion asynchronous is probably not much of an effort (just trigger it separately, from the Git Push mirror worker).
Migration notes
- Do we make a batched migration for this?
mv
is fast, the underlying SQL query should also be reasonable, but we probably lack indexes abouthg_legacy_git_conversion
(and evenvcs_type
) - It is heavier yet much safer to persist in some way the information whether a given Project has been migrated.