Page MenuHomePhabricator

clear in wbeditentity does not remove claims
Closed, ResolvedPublic

Description

When setting clear=true in the wbeditentity api module, all claims still remain in the entity. This happens because of a bug in DataModel which is not trivial to fix. Thus some workaround is needed in the api module itself.


Version: unspecified
Severity: normal
Whiteboard: u=dev c=backend p=5 s=2014-07-01

Details

Reference
bz67791

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:34 AM
bzimport set Reference to bz67791.
bzimport added a subscriber: Unknown Object (MLST).

Change 145239 had a related patch set uploaded by Bene:
Remove all claims in wbeditentity when clear=true is set

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

Change 145239 merged by jenkins-bot:
Remove all claims in wbeditentity when clear=true is set

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

Change 145342 had a related patch set uploaded by Hoo man:
Remove all claims in wbeditentity when clear=true is set

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

Change 145342 merged by jenkins-bot:
Remove all claims in wbeditentity when clear=true is set

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

It seems this bug is appearing again:

edit #1: https://www.wikidata.org/w/index.php?title=Q2846039&diff=prev&oldid=173058084
edit #2: https://www.wikidata.org/w/index.php?title=Q2846039&diff=prev&oldid=173058104

My bot sends all wbeditentity calls with clear set.

I'm not quite sure whether my bot sent one or two requests: it retries after the first failure. However there must be some fault on the server side:

If my bot sent one request, having two revision is already abnormal;

If my bot sent two requests, and even if it sent duplicated claims in the second request (which is unlikely by checking my bot's code), but as indicated in edit summary, both have clear set, so no GUID of claims would survive, which should result in an all-removal then double-addition diff (like edit#1), but it's not the case currently.

The only sensible explaination is that the server "forgot" to clear the item, which is this bug.

liangent claimed this task.

I added some logging to my bot and it appears that similar situations are due to T59754.