My understanding is that the Gerrit metadata will no more be in the database and would only be in the Git repository (known as NoteDB). Gerrit the index those metadata from git into a faster system (the secondary index, supported by Lucene).
So if I get it right, renaming a repository would mean something like:
- stop Gerrit
- move the git repository on disk
- run offline indexing to get rid of the old repository and notice the new repository
- start Gerrit
- Possibly flush the project_list cache? Had an issue with the parentproject:integration query after deleting a repository ( T263682 ). Can be done using gerrit flush-caches --cache project_list
But:
- the offline indexing takes age iirc (roughly an hour when we did it for Gerrit 3.2 upgrade).
- online indexing does not seem to support deleting informations for a no more existing repository
Gerrit mailing list discussion (2020-09-14): https://groups.google.com/g/repo-discuss/c/ZPVSc5h2hNw