Rollout plan for prevent_merge_race_condition feature flag

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

This is the rollout issue for the prevent_merge_race_condition feature flag introduced in !225517 (merged).

The feature flag gates the fix for a race condition where commits are lost when two chained merge requests are merged in quick succession.

What does the feature flag do?

When enabled, it:

  1. Sets a Redis-backed lock (via ExclusiveLease) marking a branch as pending deletion when an MR merges with "delete source branch"
  2. Blocks other MRs from merging into that branch while deletion is pending
  3. Adds a post-retarget SHA guard to prevent branch deletion if the SHA changed after retargeting

Rollout plan

  • Enable on staging
  • Test on staging
  • Enable on GitLab.com for a percentage of projects
  • Monitor for errors/issues
  • Enable on GitLab.com globally
  • Enable by default
  • Remove feature flag
Edited by 🤖 GitLab Bot 🤖