wbmergeitems api modules did not correctly merge Q7 and Q194
Closed, ResolvedPublic

Description

https://test.wikidata.org/w/index.php?title=Q7&action=history
https://test.wikidata.org/w/index.php?title=Q194&action=history

See https://www.wikidata.org/wiki/MediaWiki_talk:Gadget-Merge.js#New_merge_API

It seems the first of the two edits was made (removing the data from the first item). but the second edit (adding the data to the second item) never went through.


Version: master
Severity: major
Whiteboard: u=dev c=backend p=8

bzimport added a subscriber: Unknown Object (MLST).
bzimport set Reference to bz55960.
Addshore created this task.Via LegacyOct 21 2013, 8:28 AM
hoo added a comment.Via ConduitDec 28 2013, 9:04 AM

Problem is that we don't undo our changes to the first item (merge from) if the second item (merge target) can't be saved. There's also a TODO about that in the code "//todo if the second result is not a success we should probably undo the first change".

Solving that in a clean manner is hard, I guess... but this is actually causing trouble in production.

gerritbot added a comment.Via ConduitJan 6 2014, 11:49 AM

Change 105666 had a related patch set uploaded by Addshore:
Undo any edits if a Merge Fails!

https://gerrit.wikimedia.org/r/105666

gerritbot added a comment.Via ConduitJan 6 2014, 12:16 PM

Change 105666 abandoned by Addshore:
Undo any edits if a Merge Fails!

Reason:
per comment

https://gerrit.wikimedia.org/r/105666

Addshore added a comment.Via ConduitJan 6 2014, 12:17 PM

After further discussion with Hoo it turns out the failed merges are due to the database having bad data in it already, i.e. two items that have the same label and description.
Because of this we can not simply undo the edit as wikibase will not allow this edit to happen.
Instead we should check that both edits will be possible before merging, this might require some further refactoring of content handler classes

Addshore added a comment.Via ConduitJan 24 2014, 2:48 PM
  • Bug 60390 has been marked as a duplicate of this bug. ***
gerritbot added a comment.Via ConduitJan 30 2014, 3:47 PM

Change 110380 had a related patch set uploaded by Addshore:
Check for Label/Description conflicts in ChangeOpsMerge

https://gerrit.wikimedia.org/r/110380

gerritbot added a comment.Via ConduitMar 12 2014, 11:36 AM

Change 110380 merged by jenkins-bot:
Check for conflicts in ChangeOpsMerge preSave

https://gerrit.wikimedia.org/r/110380

Add Comment