Page MenuHomePhabricator

Cache CheckResult serializations per-entity in ObjectCache
Closed, ResolvedPublic

Description

Currently, we cache almost the full wbcheckconstraints response (T181060). This means that we have to cache the response separately for each language, since it contains rendered messages in the user’s language. Instead, we should store some serialized form of the CheckResult objects, which should contain message objects, not rendered strings. We can then render the messages only after getting the response from the cache, so we can reuse the same cached results for all languages.

One additional benefit is that we don’t need to cache the NullResults which we generate (cf. T178160), which should also save a lot of space in the cached value (given that we expect the average entity to yield few actual results that we would cache).

This also means that we can store results from any request whose status parameter is a superset of the three “interesting” statuses violation|warning|parameter, and return cached results for any request whose status parameter is a subset of them, instead of requiring an exact match. (Currently, we require an exact match because removing CheckResult arrays from the response structure is difficult.)

Preliminary breakdown:

  • introduce message class: T185710
    • and make it serializable: T185999
  • make Constraint serializable: T185711
  • make Context serializable: T185712
  • make Status serializable: T185713
  • make CheckResult serializable: T185714
  • update CachingResultsBuilder: T189593

Related Objects

StatusSubtypeAssignedTask
ResolvedLucas_Werkmeister_WMDE
OpenNone
ResolvedLydia_Pintscher
ResolvedLydia_Pintscher
ResolvedLucas_Werkmeister_WMDE
ResolvedLucas_Werkmeister_WMDE
ResolvedLucas_Werkmeister_WMDE
ResolvedLucas_Werkmeister_WMDE
ResolvedLucas_Werkmeister_WMDE
ResolvedLucas_Werkmeister_WMDE
ResolvedLucas_Werkmeister_WMDE
ResolvedLucas_Werkmeister_WMDE
ResolvedLucas_Werkmeister_WMDE
ResolvedLucas_Werkmeister_WMDE
ResolvedLucas_Werkmeister_WMDE
ResolvedLucas_Werkmeister_WMDE
DeclinedNone
ResolvedLucas_Werkmeister_WMDE
ResolvedLucas_Werkmeister_WMDE
ResolvedLucas_Werkmeister_WMDE
ResolvedLucas_Werkmeister_WMDE
OpenNone
ResolvedLucas_Werkmeister_WMDE

Event Timeline

Lucas_Werkmeister_WMDE claimed this task.

I think we can close this now. A few follow-up subtasks are still open, but the main bulk of this is done.