Enable reflog to track updates and recover in case of split brain/data loss
With enabled reflog
it is possible to recover in case of split brain/data loss.
We can enable it when we create a new repository by running git config core.logAllRefUpdates true
.
But for all existing repositories it is disabled as they are bare
repositories and this configuration is not set by default.
That is why we need to enable it by explicitly calling SetConfig
RPC with proper values for each repository using sidekiq jobs (hopefully).
Or we can go with another approach by setting it when we run RPC such as GarbageCollect
.
As another option we also can run background task that will go throw all repositories and set it.
Maybe we can use system-wide configuration file for Git as well to archive this.
/cc @jramsay @zj-gitlab @pks-t
Edited by Pavlo Strokov