Page MenuHomePhabricator

Don’t require extra cronjobs / maintenance scripts for Wikibase
Open, Needs TriagePublic

Description

I just discovered that FactGrid’s second largest database table (after text) is wb_changes, presumably because it never occurred to the wiki admins (including me) that we should run the pruneChanges.php maintenance script. Similarly, I’m not sure if change dispatching (to the wiki as its own client) works properly, because I don’t think we ever set up a dispatchChanges.php cronjob. All we have is a systemd service that keeps running runJobs.php, under the assumption that this is all that you need to keep a MediaWiki instance running.

There are probably good reasons for having change dispatching and pruning in separate scripts on Wikidata. But I think it would make managing smaller Wikibase wikis much easier if by default, Wikibase arranged for “everything necessary” to happen through the job queue, without requiring additional maintenance scripts. (There would be a few additional settings for things like the pruneChanges.php “keep” and “grace” periods, with reasonable defaults.)

Event Timeline

In the context of this task description, if wikis are not even using the changes functionality there should be a way to turn it off and have wb_change remain empty

With the Wikibase Docker distribution, dispatchChanges.php doesn't seem to work:

$ docker exec artbase-wikibase php extensions/Wikibase/repo/maintenance/dispatchChanges.php
OutOfBoundsException from line 60 of /var/www/html/extensions/Wikibase/lib/includes/SettingsArray.php: Attempt to get non-existing setting "repoDatabase"
#0 /var/www/html/extensions/Wikibase/repo/maintenance/dispatchChanges.php(93): Wikibase\Lib\SettingsArray->getSetting('repoDatabase')
#1 /var/www/html/extensions/Wikibase/repo/maintenance/dispatchChanges.php(247): Wikibase\Repo\Maintenance\DispatchChanges->getClientWikis(Array)
#2 /var/www/html/maintenance/doMaintenance.php(107): Wikibase\Repo\Maintenance\DispatchChanges->execute()
#3 /var/www/html/extensions/Wikibase/repo/maintenance/dispatchChanges.php(403): require_once('/var/www/html/m...')
#4 {main}

What is repoDatabase?

With the Wikibase Docker distribution, dispatchChanges.php doesn't seem to work:

$ docker exec artbase-wikibase php extensions/Wikibase/repo/maintenance/dispatchChanges.php
OutOfBoundsException from line 60 of /var/www/html/extensions/Wikibase/lib/includes/SettingsArray.php: Attempt to get non-existing setting "repoDatabase"
#0 /var/www/html/extensions/Wikibase/repo/maintenance/dispatchChanges.php(93): Wikibase\Lib\SettingsArray->getSetting('repoDatabase')
#1 /var/www/html/extensions/Wikibase/repo/maintenance/dispatchChanges.php(247): Wikibase\Repo\Maintenance\DispatchChanges->getClientWikis(Array)
#2 /var/www/html/maintenance/doMaintenance.php(107): Wikibase\Repo\Maintenance\DispatchChanges->execute()
#3 /var/www/html/extensions/Wikibase/repo/maintenance/dispatchChanges.php(403): require_once('/var/www/html/m...')
#4 {main}

What is repoDatabase?

This error could do with it's own phabricator ticket.