Description
Feature Description
It would be handy for scaling and other factors if the repository location could involve a multiple level hash, e.g. instead of /repo.git you have /123/456/789/repo.git or /2/repo.git. The hashing should be configurable in terms of both the unique-values-per-level and the number-of-levels.
This could support simple scaling of NFS backed storage, with perhaps the first layer being 4 (giving [0-4] as the top level directory, corresponding to 4 different mount points) and the second layer being 256 (00 - ff) which may improve performance for entries-per-directory.
The algorithm used should be exposed via some simple CLI tool or similar, such that re-hashing can be done via shell scripts or similar, e.g. mv $(gitea-hash 4 256 repo-name)/repo-name $(gitea-hash 8 256 repo-name)/repo-name
to enable scaling
Go I think implements the FNV algorithm which is pretty trivial, so low overhead.
Screenshots
No response