Last modified: 2014-11-12 18:19:33 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 T73555, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 71555 - Investigation: edit conflict for (almost) concurrently save-operations on the same entity
Investigation: edit conflict for (almost) concurrently save-operations on the...
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
WikidataRepo (Other open bugs)
master
All All
: High major (vote)
: ---
Assigned To: Wikidata bugs
u=dev c=backend p=0
:
: 71518 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-10-02 13:54 UTC by Lydia Pintscher
Modified: 2014-11-12 18:19 UTC (History)
10 users (show)

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


Attachments

Description Lydia Pintscher 2014-10-02 13:54:46 UTC
Users are seeing edit conflicts when editing several parts of the fingerprint or sitelinks in one go.
Comment 1 Lydia Pintscher 2014-10-02 14:30:18 UTC
*** Bug 71518 has been marked as a duplicate of this bug. ***
Comment 2 tobias.gritschacher 2014-10-09 07:45:53 UTC
Ok, tried this on wikidata.beta.wmflabs.org.
I tried to change 3 labels in 3 different languages (de, es, and nds) at once, which resulted in three requests sent at pretty much the same time:
1) action=wbsetlabel&format=json&id=Q32119&value=label1&language=de&baserevid=59739
2) action=wbsetlabel&format=json&id=Q32119&value=label2&language=es&baserevid=59739
3) action=wbsetlabel&format=json&id=Q32119&value=label3&language=nds&baserevid=59739
Note that the baserevid is the same for all three requests. This is supposed to cause an edit-conflict if I would change a label in the same language twice but it should definitely not cause an edit conflict when editing labels in different languages. I would guess there is a bug in the patching mechanism not taking the different language into account.
Comment 3 tobias.gritschacher 2014-10-09 08:11:14 UTC
Investigated a bit more. It seems the problem only occurs if the requests are sent nearly at the same time. If you wait a few milliseconds between the requests it works fine. Reproduced this with two different users on wikidata.beta.wmflabs.org. User1 changed the de label while User2 changed the en label at the same time. If they click on save at the same time they get an edit conflict. If User2 waits a short moment there's no edit conflict.
Comment 4 Bene* 2014-10-09 15:37:44 UTC
Wouldn't it be better if only one request was sent? When clicking on save I don't suppose several edits are made but only one.
Comment 5 Jan Zerebecki 2014-10-09 15:42:10 UTC
Yes, but that doesn't solve the case of multiple user outlined in comment #3 .
Comment 6 Lydia Pintscher 2014-10-09 15:52:04 UTC
We do want several edits to be able to have granular, translatable edit summaries.
Comment 7 Bene* 2014-10-09 16:14:58 UTC
(In reply to Jan Zerebecki from comment #5)
> Yes, but that doesn't solve the case of multiple user outlined in comment #3
> .

The case that two different users hit save in the same second is very rare and perhaps not really fixable at all. However, this happens now very often because we send several requests when hitting save once. Also when several edits are made only one request should be sent imo to avoid those issues.
Comment 8 tobias.gritschacher 2014-10-10 07:27:47 UTC
(In reply to Bene* from comment #7)
> (In reply to Jan Zerebecki from comment #5)
> > Yes, but that doesn't solve the case of multiple user outlined in comment #3
> > .
> 
> The case that two different users hit save in the same second is very rare
> and perhaps not really fixable at all. However, this happens now very often
> because we send several requests when hitting save once. Also when several
> edits are made only one request should be sent imo to avoid those issues.

Something would be really wrong if this is not fixable.
Having one request for multiple edits would solve the issue with the multi-edit-mode but introduce another one. As Lydia already outlined, the changes made would not be granular on history and recent changes pages anymore. You would just see: "Item Q1234 was changed". It is simply not possible to pack all the possible information about a possibly huge edit into 256 chars of summary (which is a limit in MediaWiki).
Comment 9 tobias.gritschacher 2014-10-14 17:01:23 UTC
Changed the topic of the bug:
This does not only happen when editing several terms or sitelinks at the same time. This applies to any edit operation on an entity. When several save-operations happen at the same time an edit-conflict is detected. This needs investigation what the root-cause is.
Comment 10 tobias.gritschacher 2014-10-14 17:03:19 UTC
Some symptoms of this might be worked around by https://bugzilla.wikimedia.org/show_bug.cgi?id=72020 but the root-cause really lies in the backend and must be solved separately.
Comment 11 Marius Hoch 2014-10-14 17:21:15 UTC
I guess this is a "late" edit conflict which happens after the attempted edit conflict resolution (patching). Possible solutions might include re-attempting to patch the entity in case we hit a late conflict. Not sure how much work that would be.

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


Navigation
Links