Skip to content

[Feature flag] Enable transactional file locking

What

Enable the :gitaly_tx_file_locking feature flag, which enables locking of files for transactional update. This will guarantee raceless updating of and voting on changes for both the gitattributes and the gitconfig file by using a lockfile.

Rolls out !3821 (merged), part of #3709 (closed).

Owners

  • Team: Gitaly
  • Most appropriate slack channel to reach out to: #g_create_gitaly
  • Best individual to reach out to: pks-t

Expectations

What release does this feature occur in first?

%14.3

What are we expecting to happen?

Ideally, no change in behaviour should occur. Realistically though we may see more ApplyGitattributes and SetFullPath RPC calls failing because we are in a much better position to detect races now.

What might happen if this goes wrong?

Modifying the gitattributes or gitconfig files may fail.

What can we monitor to detect problems with this?

Roll Out Steps

  • Read the documentation of feature flags
  • Add featureflagstaging to this issue (howto)
  • Is the required code deployed? (howto)
  • Do we need to create a change management issue? (howto)
  • Enable on staging (howto)
  • Test on staging (howto)
  • Verify the feature flag was used by checking Prometheus metric gitaly_feature_flag_checks_total
  • Announce on this issue an estimated time this will be enabled on GitLab.com
  • Add featureflagproduction to this issue
  • Enable on GitLab.com by running chatops command in #production (howto)
  • Cross post chatops slack command to #support_gitlab-com and in your team channel
  • Verify the feature flag is being used by checking Prometheus metric gitaly_feature_flag_checks_total
  • Announce on the issue that the flag has been enabled
  • Did you set the feature to both 100% and true (howto)
  • Submit a MR to have the feature OnByDefault: true and add changelog entry (howto)
  • Have that MR merged
  • Possibly wait for at least one deployment cycle (howto)
  • Submit an MR to remove the pre-feature code from the codebase and add changelog entry (howto)
  • Have that MR merged
  • Remove the feature flag via chatops (howto)
  • Close this issue
Edited by Patrick Steinhardt
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information