Last modified: 2014-09-24 00:12:42 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.
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).
Created attachment 8910 [details] Race condition check Error message could probably be better worded.
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).
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.
Hey John, would you mind putting this in Gerrit? Thanks.
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.
No.
(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).