Page MenuHomePhabricator

action=wbeditentity for creation fails randomly with error edit-already-exists
Closed, DuplicatePublic


Request: {'format': 'json', 'bot': True, 'token': '****', 'action': 'wbeditentity', 'new': 'item', 'data': '{}'} in urlencoded form.

Response: {"servedby": "mw1115", "error": {"info": "Could not create a new page.\nIt already exists.", "code": "save-failed", "messages": {"0": {"type": "error", "name": "edit-already-exists"}, "html": {"*": "<p>Could not create a new page.\nIt already exists.\n</p>"}}}}

Per DanielK: "that sounds like a race condition. should not happen, the id increment function should be atomic."

Version: unspecified
Severity: normal
See Also:



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:57 AM
bzimport set Reference to bz50940.
bzimport added a subscriber: Unknown Object (MLST).
  • Bug 52615 has been marked as a duplicate of this bug. ***

While the underlying problem shouldnt occur, the current error condition should be given a different error name because 'edit-already-exists' in core is a permanent error whereas Wikibase is using it for a transient & internal error condition.

If it has its own error code, software can detect this problem and decide whether to resubmit based on whether the Wikibase server version indicates resubmitting will resolve the error.(i.e. when talking to a server with the underlying bug is fixed, the software would not presume this error code is transient.)

As an example, pywikibot is currently resubmitting (25 times?) on any 'failed-save' error response, including (almost) permanent error conditions like wikibase-error-label-not-unique-item. I've provided sample code for better handling on bug 62126.

Lydia_Pintscher removed a subscriber: Unknown Object (MLST).
Lydia_Pintscher removed a subscriber: Unknown Object (MLST).

If this bug still happens please reopen it.