daniel added a comment.

Suspicion (1) seems to be unfounded:

- api/EditEntity calls ModifyEntity::applyChangeOp on a ChangeOps object.
- ModifyEntity::applyChangeOp calls ChangeOp(s)::validate
- For each ChangeOp a ChangeOps instances contains, ChangeOps::validate will 
first call validate on that change op, then apply it.
- So if there is a LabelChangeOp and a DescriptionChangeOp for the same 
language, in any order, the second op would check against the entity with the 
first op applied, detecting any conflict.
- Note that validation of the first op could fail due to a false positive, 
because of a conflict that would be resolved by applying the second op.

A better way to do this would be to use a combind LabelAndDescriptionChangeOp. 
That would also remove the overhead of running the same constraint check twice.


TASK DETAIL
  https://phabricator.wikimedia.org/T121395

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: daniel
Cc: thiemowmde, gerritbot, Bene, Lydia_Pintscher, hoo, aude, Aklapper, daniel, 
Jonas, StudiesWorld, Izno, Wikidata-bugs, Mbch331



_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to