Merge request fails to merge if another MR is merged at the same time
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=515462) </details> <!--IssueSummary end--> ### Summary We quite often experience issues on our Gitlab.com projects where multiple MR are merged around the same time +/- 2 seconds and randomly fail. These MR are created from trigger jobs with the setting `Auto-merge enabled`. The pipelines are successful and the merge event is triggered but then fails for one out of three MR with the error message `<User> restored source branch <Branch name>`. The changes in these MR are not related, different files are edited and it fails with the following error: ![image](/uploads/5d8e75c6081ea41cc90857adb3e165cb/image.png) There is no conflicts and manually merging works without an issue but our process is meant to be automated. ### Steps to reproduce Create multiple MR with unrelated changes to avoid conflicts using the following flags: `git push -o merge_request.create -o merge_request.merge_when_pipeline_succeeds -o merge_request.remove_source_branch -o merge_request.target=main --set-upstream origin "trigger/$(date +%s%N)"` ### What is the current *bug* behavior? One or more of the MR fail to merge with the above error message. ### What is the expected *correct* behavior? All MR should be merged either immediately or added to a queue of some kind. ### Output of checks <!-- If you are reporting a bug on GitLab.com, uncomment below --> This bug happens on GitLab.com
issue