Page MenuHomePhabricator

Read constraint check results from cache and check freshness
Closed, ResolvedPublic

Description

When constraint check results are available in the object cache, fetch them from there and check (via the tracked information from T182104) whether they’re still valid, that is, whether the revision IDs stored in T182105 are still the current ones for those entities.

Event Timeline

Also: adjust the cached information embedded in the results! The best way to do that is probably to move array serialization and deserialization of CachingMetadata into that class itself, so that we can turn "cached": { "maximumAgeInSeconds": 500 } back into a CachingMetadata object which we can then merge with another CachingMetadata object indicating the ObjectCache TTL. And also we need a list of constraint types where we do and don’t attach this information (i. e., for most constraint types the results are always fresh if we invalidate them often enough) – I think I had this list in some other task already.

EDIT: This was split off into T182992: Update 'cached' information when getting constraint check results from cache.

Change 398064 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] WIP: read constraint check results from cache

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

WMDE-leszek renamed this task from Read constraint check results from cache and check freshness to Read constraint check results from cache and check freshness (days: 1).Dec 18 2017, 11:19 AM
WMDE-leszek renamed this task from Read constraint check results from cache and check freshness (days: 1) to Read constraint check results from cache and check freshness (days: 2).Dec 19 2017, 11:45 AM
WMDE-leszek renamed this task from Read constraint check results from cache and check freshness (days: 2) to Read constraint check results from cache and check freshness.Dec 19 2017, 2:27 PM
WMDE-leszek moved this task from Backlog to Review on the Wikidata-Sprint-2017-12-20 board.

Change 399619 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] Simplify the microtime() mocking in CachingResultsBuilderTest

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

Change 398064 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Read constraint check results from cache

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

Change 399619 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Simplify the microtime() mocking in CachingResultsBuilderTest

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