Page MenuHomePhabricator

[Task] Investigation: Find solutions for broken term contraints checking
Closed, ResolvedPublic

Event Timeline

Tobi_WMDE_SW updated the task description. (Show Details)
Tobi_WMDE_SW raised the priority of this task from to High.
Tobi_WMDE_SW moved this task from Proposed to Backlog on the Wikidata-Sprint-2016-02-02 board.
Tobi_WMDE_SW added subscribers: thiemowmde, gerritbot, Bene and 8 others.
Lydia_Pintscher moved this task from incoming to in progress on the Wikidata board.Feb 3 2016, 1:28 PM
daniel claimed this task.Feb 8 2016, 12:44 PM
daniel added a comment.EditedFeb 8 2016, 4:35 PM

Problem: when validating an edit, we apply the modification to the base revision of the entity, and the check for conflicts. However, the modification is eventually applied to the current revision of the entity (via the diff-and-patch mechanism in EditEntity).

Quick solution suggested by Jan: for validation, apply the modification to the current revision of the entity, and check for conflicts. Then, apply it to the base revision, and go through the diff-and-patch mechanism in EditEntity.

Better solution avoiding diff-and-patch: before validation, have the ChangeOp check for a conflict by looking at both, the base and current revisions of the entity. IF there is no conflict, apply the modification to the current revision, check for conflicts, and save without any diff-and-patch. See T126231: [RFC] Detect edit conflicts in ChangeOp instead of using diff-and-patch in EditEntity.

daniel closed this task as Resolved.