Page MenuHomePhabricator

Provide for deleting stale rows from wikimedia_editor_tasks_entity_description_exists
Closed, DeclinedPublic

Description

The populateEntityDescriptionExistsTable script replaces rows corresponding to sitelinks according to whether or not a description exists for that language. However, we currently have no means of removing rows where a sitelink (or underlying article) is deleted. We need an affordance for doing this.

Event Timeline

Mholloway renamed this task from Maintenance script to clear stale rows from wikimedia_editor_tasks_entity_description_exists to Provide for deleting stale rows from wikimedia_editor_tasks_entity_description_exists.Apr 1 2019, 5:49 PM
Mholloway updated the task description. (Show Details)

@Tgr The simplest way that's occurred to me for handling this would be to add a timestamp column to wikimedia_editor_tasks_entity_description_exists. Then we could simply run a DELETE query daily for any row with a timestamp more than a few days old (assuming we're running the populate script daily), with the old timestamp indicating that the sitelink corresponding to the row no longer exists in wb_items_per_site and is no longer being updated by the populate script.

I imagine we'd have to follow a batch and wait-for-replicate strategy here, too, but at least it would avoid having to add another complex query for this feature.

Yeah, that seems like a good approach.

We're not using this table going forward.