Page MenuHomePhabricator

add function change_if_older_than() to Wikidata API
Closed, ResolvedPublic

Description

Worsening of Query Service performance is inevitable. This is of concern for maintenance bots that work with existing items, because queries to the WDQS may not even return with large datasets (articles, chemical compounds, proteins). So the maintainer works with a WD dump that has certain age, moreover the processing of the dump can take a long time (days). Items may change in that time.

One solution, other than improving the service, may be to offer functionality in the WD API that allows to set a parameter of date type and value x, a date in the past. The effect of it should be to return an error if a change was attempted, within the same edit group, to an item that has a last changed date later than x. This way no items are overwritten that have changed in the meantime, e.g. after the dump was made.

Or something to that effect, please improve the idea! I have little knowledge about the API so maybe the best implementation might look quite different. However, there is real need for such functionality, in my opinion.

Event Timeline

If you’re making edits based on existing page data, set the baserevid parameter to the revision ID that your edit is based on, and then Wikibase will refuse the edit if there’s an edit conflict. This applies regardless of whether your data source is a dump or more recent data.

SCIdude claimed this task.

Thanks, that would be a practical solution.