Wikibase
MediaWiki Wikibase extension
|
This document describes the deployment process necessary for migrating from “naive” sitelink based dispatching and purging to the full usage tracking needed to support arbitrary access to entities from wikitext.
Overview of the tables involved (using “repowiki” and “clientwiki” as the database name and site ID for the repo and respective client wiki):
repowiki.wb_items_per_site The sitelinks stored on the repo, mapping entity IDs to page titles on client wikis.
repowiki.wb_changes_subscription (new) Subscriptions to change notifications, mapping entity IDs to client site ids. (Note that site ids are often, but not necessarily, the same as the client wiki's database name).
clientwiki.wbc_entity_usage (new) Tracks the usage of entities on the client, including the information which page uses which aspect of which entity.
<– For deferred deployment of schema changes, usage of the new tables can be disabled using the appropriate feature switches: –>
Maintenance scripts are used to populate the new database tables used for usage tracking and subscription management:
repo/maintenance/populateChangesSubscription.php Populates wb_changes_subscription table based on repowiki.wb_items_per_site.
client/maintenance/populateEntityUsage.php Populates the wbc_entity_usage table based on repowiki.wb_items_per_site (data transfer from repo to client).
client/maintenance/updateSubscriptions.php Updates repowiki.wb_changes_subscription based on the client wiki's wbc_entity_usage table (data transfer from client to repo). This should be run after populateChangesSubscription.php and populateEntityUsage.php.
Deployment of the new usage tracking scheme can be done in three steps:
To set up the subscription tracking table wb_changes_subscription on the repo:
NOTE: If any clients already have usage tracking enabled, then updateSubscriptions.php can also be run and subscription tracking enabled for each of them at this point. See the instructions in section Start tracking client subscriptions based on entity usage below.
To enable usage tracking on a client wiki:
Client wikis should automatically update their subscription to changes on the repo based on which entities they use. To enable such subscription tracking based on entity usage: