Race condition in web editor / generates bad commits.
Created by: gbb
Hi guys, an easy to trigger race condition in the web file editor. (Gitlab version: 6.7.2)
We have a page for meeting minutes (attached at bottom). When two or more people try to write their weekly notes at the same time, one set of notes is lost. This is because the commit generated by the second person reverts the text of the first person's committed changes. The problem becomes worse with more people.
Pattern:
Person1 opens the edit page and begins adding their notes. Person2 opens the edit page and begins adding their notes. Person1 saves and commits their notes. Person2 saves and commits their notes. This silently reverts the text from Person1.
There needs to be a merge here which isn't happening. The editor should make a note of the version of the file when the edit page is opened - so that the commit can be with respect to the latest version at the time of opening and not the latest version at the time of commit.
Example text template as seen by Person2 before their commit:
Person1
-
-
Person2
- My stuff
- More stuff
Person3
-
-
Example text template as seen by Gitlab before Person 2's commit.
Person1
- My thing
- My other thing
Person2
-
-
Person3
-
-