Page MenuHomePhabricator

Store constraint check results and tracked entities in object cache
Closed, ResolvedPublic

Description

For each tracked entity, track the current revision ID of that entity.

Open question: what about invalidating constraint check results when a constraint statement is edited? Do we track the current revision ID of the property as well? Or can we do something more sophisticated? (With T182110: Only update constraints table when constraint statements were edited, we will in theory have the option to know which revisions actually changed the constraints and which didn’t, but we’d have to keep track of that somewhere.)

Patch-For-Review:

Event Timeline

what about invalidating constraint check results when a constraint statement is edited?

This Grafana chart shows how the rate of constraintsTableUpdate jobs dropped with the deployment of T182110: Only update constraints table when constraint statements were edited. At a glance, it seems like roughly one tenth of all property changes affect the constraints (the avg in the chart drops by about one order of magnitude). So it might be worth trying to only invalidate cached check results when the property statements change, but for a first version we can probably do without it, and only track the full property revision ID.

Change 396408 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] Add and use CachedCheckConstraintsResponse

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

Change 397594 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] Add and use CachingResultsBuilder

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

Change 396408 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Add and use CachedCheckConstraintsResponse

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

Change 397594 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Add and use CachingResultsBuilder

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