|
Wikibase
MediaWiki Wikibase extension
|
A job to cleanup the wbt_* terms table rows when they may not be needed any more. More...
Inheritance diagram for Wikibase\Lib\Store\Sql\Terms\CleanTermsIfUnusedJob:
Collaboration diagram for Wikibase\Lib\Store\Sql\Terms\CleanTermsIfUnusedJob:Public Member Functions | |
| __construct (TermStoreCleaner $cleaner, $params) | |
| run () | |
| Of the given term in lang IDs, delete those that are not used by any other items or properties. | |
Static Public Member Functions | |
| static | getJobSpecification (Title $unused, array $params) |
| static | getJobSpecificationNoTitle (array $params) |
Public Attributes | |
| const | JOB_NAME = 'CleanTermsIfUnused' |
| const | TERM_IN_LANG_IDS = 'termInLangIds' |
Private Attributes | |
| $termInLangIdsCleaner | |
A job to cleanup the wbt_* terms table rows when they may not be needed any more.
This job currently executes in a single transaction.
Callers can choose to supply a single termInLang id to clean per job or multiple. Supplying multiple ids will naturally mean the Job and the transaction take longer and therefor locks will also be held for a longer period of time possibly causing lock contention. This started to show on wikidata.org in https://phabricator.wikimedia.org/T246898 and thus the default was switched for create a single job per termInLang id. For smaller Wikibase installs with a lower edit rate it might make sense to instead optimize for fewer jobs, where lock contention is less of an issue.
| Wikibase\Lib\Store\Sql\Terms\CleanTermsIfUnusedJob::__construct | ( | TermStoreCleaner | $cleaner, |
| $params ) |
| TermStoreCleaner | $cleaner | |
| array | PageReference | null | $params |
|
static |
| Title | $unused | But required due to the code in Job::factory currently. |
| array | $params |
|
static |
| Wikibase\Lib\Store\Sql\Terms\CleanTermsIfUnusedJob::run | ( | ) |
Of the given term in lang IDs, delete those that are not used by any other items or properties.
|
private |
| const Wikibase\Lib\Store\Sql\Terms\CleanTermsIfUnusedJob::JOB_NAME = 'CleanTermsIfUnused' |
| const Wikibase\Lib\Store\Sql\Terms\CleanTermsIfUnusedJob::TERM_IN_LANG_IDS = 'termInLangIds' |