X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FpopulateContentTables.php;h=567161f6f180b21cd9a32554a3d263185db81863;hb=9ddd146c262806e993ea66994f367a0a795e762d;hp=3325b054566d263143c794cf0a4aa0f2d21997a6;hpb=cb5acb42ce62b2d600dfb4e11a2982602b670a2f;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/populateContentTables.php b/maintenance/populateContentTables.php index 3325b05456..567161f6f1 100644 --- a/maintenance/populateContentTables.php +++ b/maintenance/populateContentTables.php @@ -42,6 +42,9 @@ class PopulateContentTables extends Maintenance { /** @var NameTableStore */ private $contentModelStore; + /** @var NameTableStore */ + private $slotRoleStore; + /** @var BlobStore */ private $blobStore; @@ -71,9 +74,14 @@ class PopulateContentTables extends Maintenance { private function initServices() { $this->dbw = $this->getDB( DB_MASTER ); $this->contentModelStore = MediaWikiServices::getInstance()->getContentModelStore(); + $this->slotRoleStore = MediaWikiServices::getInstance()->getSlotRoleStore(); $this->blobStore = MediaWikiServices::getInstance()->getBlobStore(); - $this->mainRoleId = MediaWikiServices::getInstance()->getSlotRoleStore() - ->acquireId( SlotRecord::MAIN ); + + // Don't trust the cache for the NameTableStores, in case something went + // wrong during a previous run (see T224949#5325895). + $this->contentModelStore->reloadMap(); + $this->slotRoleStore->reloadMap(); + $this->mainRoleId = $this->slotRoleStore->acquireId( SlotRecord::MAIN ); } public function execute() {