Page MenuHomePhabricator

Edit conflict resolution fails when one user edits multiple times
Closed, ResolvedPublic


Author: andreengels

I have had a few complaints lately about the bot making 'wrong' edits to pages.
It appears that there are cases where the bot can revert the edit by someone
else. More specifically, what seems to be going on is this:

Someone is running the bot twice, and gets the following:

  • Bot (run 1) reads the page
  • Bot (run 2) reads the page
  • Someone else makes an edit on the page
  • Bot (run 1) saves the page
  • Bot (run 2) saves the page

What happens now is that when the first bot saves the page, the bot's edit and
the other edit are seen to be in conflict, and the edit conflict is resolved
correctly, the two edits being merged. But when the *second* bot saves the same
page, there is no edit conflict seen, and the second bot's version is saved
unchanged - with the usually unwanted effect of reverting the other person's edit.

Apparently, whatever module is checking for edit conflicts, does not ring a bell
when the last edit was made by the same user, even if the user is still basing
his edit on an old version which thereby conflicts with an edit of another user.
Could this be corrected?

Version: 1.6.x
Severity: major



Event Timeline

bzimport raised the priority of this task from to High.Nov 21 2014, 8:51 PM
bzimport set Reference to bz3604.
bzimport added a subscriber: Unknown Object (MLST).

Can you confirm this making the edits manually? (Use three browsers, or three

Can you confirm that both bots are using separate user accounts? (If they are using the
same user account, then this is expected behavior as you can overwrite your own last
edit by hitting 'back', except with section edits where this has been disabled.)

andreengels wrote:

  1. See the history of
  1. The 2 bots are not separate user accounts. However, this may be expected

behavior, but is it wanted behavior? Overwriting your own edits this way should
be okay, but the bug is that you are overwriting *other people's edits* that
were in an automatically resolved edit conflict with your first edit. I don't
see that as wanted behaviour. Suppose I load an edit page, and make a change on
it, while in the meantime someone else has edited the page elsewhere. Then I hit
back, and edit again. It seems reasonable that that is not considered an edit
conflict with myself, but now it is not considered an edit conflict at all, also
not with the other person - which means that his edit is lost.

rowan.collins wrote:

As Andre's comment there says, this is the same issue as bug 1150, which
contains much discussion.

*** This bug has been marked as a duplicate of 1150 ***