Page MenuHomePhorge

Phabricator silently overwrites concurrent changes (no conflict detection)
Open, Needs TriagePublic

Description

When having 2 (or more) users editing the same thing at the same time (e.g. a task description), the last person who saved (almost?) always overwrite all changes, silently, and this is a problem.

Minimal steps to reproduce to simulate an edit conflict:

  1. open a task in 2 tabs (also from same session)
  2. in tab 1: set title, description, tags, subscribers (and other things) to "foo" (don't save)
  3. in tab 2: set title, description, tags, subscribers (and other things) to "bar" (don't save)
  4. from tab 1, save
  5. from tab 2: save

What happens:

  • the last editor overwrote all changes (now task 1 has "bar" everywhere)
  • the log is a mess, where "foo" was successfully saved, but then rolled back and overwrote by "bar"

What should happen instead (minimal viable solution):

  • The last user is informed that an edit conflict happened

Bonus point:

  • User can easily see what changed before, and can see again what they will set if they force save
  • User can decide to "Force save" (to do just what happened before silently...)

Super bonus point:

  • User can easily fix the edit conflict, looking at A, looking at B, and saving C

Edit Conflict in Other Collaborative Platforms

https://www.mediawiki.org/wiki/Help:Edit_conflict

Past Discussions

This is well-known since 2014:

https://secure.phabricator.com/T4768

Event Timeline

I have also noticed this issue when submitting updates to a revision -

  1. I have a revision already in Phorge
  2. I arc patch it
  3. I made a code edit
  4. I arc diff to update the change
    • Things happen for a long time while lint and unit test runs
  5. In mean time, I realize I want to add a screenshot or make some other edit to the revision
  6. I edit the revision in Phabricator and add content and save it

...

  1. Later on the arc diff unit tests finish, upload the change, and overwrite my updates

I am not sure "how" this should be resolved? Either way, someone has to "win" the edit?