Page MenuHomePhabricator

Create RevisionStoreFactory [MCR]
Closed, ResolvedPublic

Description

A first version of RevisionStoreFactory was introduced in https://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/442285/ and will be reverted in https://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/443593/ due to some issues.

RevisionStoreFactory needs to be re implemented.

Considerations missed in the first patch:

  • BlobStore is per wiki, so BlobStoreFactory must be used
  • Both NameTableStores are per wiki, so some factory may be needed
  • ActorMigration is per wiki, as different wikis may have different migration configuration
  • CommentStore is per wiki, as different wikis may have different migration configuration
  • MCR itself may be at different migration stages on different wikis

Perhaps we could use SiteConfiguration to gain access to the various migration stages on the different wikis: If a SiteConfiguration is injected, the local values of the migrations tage for MCR, CommentStore and Actor are overwritten by the value for the target wiki retrieved from SiteConfiguration.

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.

Event Timeline

Addshore triaged this task as Normal priority.Jul 3 2018, 12:02 PM
Addshore created this task.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 3 2018, 12:02 PM
daniel updated the task description. (Show Details)Jul 5 2018, 2:26 PM
daniel updated the task description. (Show Details)Jul 5 2018, 2:28 PM

Change 443985 had a related patch set uploaded (by Daniel Kinzler; owner: Addshore):
[mediawiki/core@master] Introduce RevisionStoreFactory & Tests

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

daniel updated the task description. (Show Details)Jul 5 2018, 2:59 PM
Anomie added a subscriber: Anomie.EditedJul 5 2018, 3:59 PM

Perhaps we could use SiteConfiguration to gain access to the various migration stages on the different wikis: If a SiteConfiguration is injected, the local values of the migrations tage for MCR, CommentStore and Actor are overwritten by the value for the target wiki retrieved from SiteConfiguration.

The method you'd use to do that is SiteConfiguration::getConfig(). Note its documentation: "For foreign wikis, this is expensive, and only works if maintenance scripts are setup to handle the --wiki parameter such as in wiki farms."

While you could in theory get most of the way there by passing the correct $wiki, $suffix, $params, and $wikiTags to SiteConfiguration::get(), determining the correct values for those variables for an arbitrary other wiki is non-trivial. On WMF sites, you'd basically need to duplicate lines 176 and 199-227 of CommonSettings.php and you'd still be out of luck if that wiki uses the value from DefaultSettings.php or overrides it in LocalSettings.php (e.g. everything in WMF's config that uses a "$wmgFoo" variable).

daniel closed this task as Resolved.Aug 2 2018, 5:50 PM

Change 443985 merged by jenkins-bot:
[mediawiki/core@master] Introduce RevisionStoreFactory & Tests

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