Avoid joins when reading MCR revisions.
authordaniel <daniel.kinzler@wikimedia.de>
Wed, 22 Aug 2018 16:08:23 +0000 (18:08 +0200)
committerJames D. Forrester <jforrester@wikimedia.org>
Thu, 23 Aug 2018 23:57:50 +0000 (16:57 -0700)
commit4b4afe7cbe83d770c0f5c06406d2110a2d7f56f6
tree4477510f4024536ffca4b8e480fd4eac5585baa9
parent29c803227f0daea2664c16966596c012b303cec2
Avoid joins when reading MCR revisions.

When loading revision slots from the new MCR schema, slot role names
and content model names need to be resolved. Doing so programmatically
based on an in-memory cache avoids having to join against two additional
table every time we load slot meta-data.

This relies on NameTableStore, which was designed for exactly this use
case.

Bug: T198561
Change-Id: Ic005931b669f9d0173ef47ac17331d44fb1141ca
includes/Storage/RevisionStore.php
tests/phpunit/includes/Storage/McrReadNewRevisionStoreDbTest.php
tests/phpunit/includes/Storage/McrRevisionStoreDbTest.php