Replace Wiki create_page and update_page RPCs by normal Repository RPCs
Gitaly performs all read and write operations on Git data, right now that means on each (code) repository, design assets, and wikis. Soon this will include snippets too. All the different kinds of Git data use a shared interface, except for the Wiki data. Most of the wiki data is maintained through their own Gitaly service; the WikiService.
This was done mostly to speed up the migration off NFS, as the risk of moving the code was limited to the actual move, and no additional change in logic. However, this makes the wikis the odd duck, which in my opinion should be mitigated. Other than just paying of technical debt, this has multiple benefits:
- Developer productivity:
- Given wikis, compared to code repositories, have much less features, porting features to wikis wouldn't require any Gitaly changes.
- Performance improvements:
- Gitaly has multiple performance improvements that greatly benefit latencies, such as: bitmap indexes, cat-file caches, repacking, garbage collection, and many more.
- No dependency on Ruby+Rugged on the Gitaly side
- Gollum, the gem being used to read/write the data, is written in Ruby. This potentially makes Gitaly-Ruby extra slow as Rugged does system calls while holding the GIL. Which in turn might mean each Wiki RPC is basically a noisy neighbour and slowing down their own requests as well as other clients requests. This could be partially be mitigated by using the gollum adapter that uses native Git, however this gem seems to have gone stale and unmaintained: https://rubygems.org/gems/gollum-grit_adapter
Proposal
To keep Gollum, but a the same time move away from the Wiki RPCs, a
gollum-gitaly_adapater
should be written. At first this adapter calls the old
wiki interface allowing the migration of this interface in a 1 by 1 fashion. The
grit adapter is about 420 lines of code, so the first iteration will probably be
fairly small and contained.