Last modified: 2014-04-30 08:08:43 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T52940, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 50940 - action=wbeditentity for creation fails randomly with error edit-already-exists
action=wbeditentity for creation fails randomly with error edit-already-exists
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
WikidataRepo (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Wikidata bugs
:
: 52615 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-08 13:43 UTC by Liangent
Modified: 2014-04-30 08:08 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Liangent 2013-07-08 13:43:35 UTC
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."
Comment 1 Addshore 2013-08-11 20:16:45 UTC
*** Bug 52615 has been marked as a duplicate of this bug. ***
Comment 2 John Mark Vandenberg 2014-04-30 08:08:43 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links