Skip to content

repository: Always lock gitconfig and gitattributes on write

We used to directly write to both the gitconfig and gitattributes files without having proper locking semantics which assert that there was no concurrent write to the same file. As a result, it could be that multiple RPCs which modify the same file all succeeded, but overwrote their respective changes.

This was fixed via a new locking file writer, which locks the file, votes on the changes and then commits it into place only if all nodes agree on the change and if there was no concurrent write to the same file. Like this, we now have atomic guarantees on both the gitconfig and gitattributes files.

Remove the feature flag which guards this code. It has been tested in production without any observed issues.

Closes #3764 (closed)

Merge request reports

Loading