Support write-ahead logging custom hooks
Gitaly's TransactionManager
currently doesn't support write-ahead logging custom hooks. We need to add this support so the custom hooks can get replicated through the log. This will also help in future with consistent reads of custom hooks for snapshots which would be important for backups for example.
One question is in what format should the hooks be stored in the log. One option could be to log a TAR containing the custom hooks as used in RestoreCustomHooks
. The other option would be to define a protobuf schema which allows for describing the locations of the files and their contents.
Support for snapshot reads for the hooks could be left for later now, so applying the log entry could just place the hooks in the custom hooks directory for now. Eventually we'll have to maintain multiple versions for snapshots.