Last modified: 2014-09-24 00:12:42 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T32211, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 30211 - Detect conflict on move
Detect conflict on move
Status: NEW
Product: MediaWiki
Classification: Unclassified
Special pages (Other open bugs)
unspecified
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
http://de.wikipedia.org/w/index.php?t...
: patch, patch-reviewed
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-04 08:02 UTC by Umherirrender
Modified: 2014-09-24 00:12 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Race condition check (4.36 KB, patch)
2011-08-11 18:53 UTC, John Du Hart
Details

Description Umherirrender 2011-08-04 08:02:04 UTC
A user on de.wp has seen a move conflict (see URL). Both moves are in the same minute (two second difference). It is possible to check for a conflict here, to reject the 2nd move? Thanks.
Comment 1 John Du Hart 2011-08-11 02:54:34 UTC
The example is really weird. Both moves are A -> B, however in my tests trying to move A -> B (Open two move windows, submit one after the other), I get an error on the last one about B already existing and asking for my permission (Because I'm a sysop) before deleting B to make way for A. It's possible that there was DB lag which caused for nothing to happen for user 2.

On a similar note, trying to do 2 moves in a similar fashion except as A -> B and A -> C results in a double redirect of  A -> C -> B. Probably the best prevention of this is race condition check (Similar to how edit conflicts are handled).
Comment 2 John Du Hart 2011-08-11 18:53:57 UTC
Created attachment 8910 [details]
Race condition check

Error message could probably be better worded.
Comment 3 Umherirrender 2011-08-17 17:38:06 UTC
It is not enough to check the starttime against the latest revisiontimestamp like EditPage do for normal edit? That means, edit-move conflict is also detected, when someone has edit the page, while a user is trying to move the same page.

The other way round is also interesting (bug 5408, bug 23044).
Comment 4 John Du Hart 2011-08-17 17:43:04 UTC
I didn't think it was worth checking to see if the page has edited. Imo who cares if someone edited the page after you open the form, it doesn't affect the move you're about to do.
Comment 5 Sumana Harihareswara 2012-05-25 03:00:37 UTC
Hey John, would you mind putting this in Gerrit?  Thanks.
Comment 6 Andre Klapper 2013-01-09 13:17:09 UTC
Hi John, would you have time to use Developer access
  https://www.mediawiki.org/wiki/Developer_access
to submit this as a Git branch directly into Gerrit:
  https://www.mediawiki.org/wiki/Git/Tutorial

Putting your branch in Git makes it easier for us to review it quickly.
Thanks again! We appreciate your contribution.
Comment 7 John Du Hart 2013-01-10 18:41:16 UTC
No.
Comment 8 Andre Klapper 2014-02-18 14:31:52 UTC
(In reply to John Du Hart from comment #2)
> Created attachment 8910 [details]
> Race condition check

Result from uploading patch:
patch -p0 < patch 
patching file includes/specials/SpecialMovepage.php 
Hunk #1 FAILED at 34. 
Hunk #2 succeeded at 93 with fuzz 1 (offset 7 lines). 
Hunk #3 succeeded at 136 with fuzz 2 (offset -57 lines). 
Hunk #4 FAILED at 336. 
Hunk #5 succeeded at 529 (offset 127 lines). 
Hunk #6 FAILED at 472. 
3 out of 6 hunks FAILED -- saving rejects to file includes/specials/SpecialMovepage.php.rej 
patching file languages/messages/MessagesEn.php 
Hunk #1 succeeded at 3529 with fuzz 2 (offset 257 lines). 
patching file languages/messages/MessagesQqq.php 
Hunk #1 FAILED at 2889. 
1 out of 1 hunk FAILED -- saving rejects to file languages/messages/MessagesQqq.php.rej 
patching file maintenance/language/messages.inc 
Hunk #1 succeeded at 2450 (offset 203 lines).

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links