Description
Details
| Status | Subtype | Assigned | Task | ||
|---|---|---|---|---|---|
| Open | None | T348573 All Wikimedia extensions that store their data outside the main database should use a virtual database domain | |||
| Resolved | abi_ | T348513 Migrate ContentTranslation to use a virtual database domain |
Event Timeline
Change #1152065 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):
[operations/mediawiki-config@master] CX: Add virtual-cx-shared DatabaseVirtualDomains
Change #1152068 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):
[mediawiki/extensions/ContentTranslation@master] Introduce usage of DatabaseVirtualDomains
I see two configuration options in ContentTranslation extension,
- ContentTranslationDatabase - The Database domain ID of the relevant wiki or false for the local wiki
'wgContentTranslationDatabase' => [ 'default' => 'wikishared', 'testwiki' => 'testwiki', ],
- ContentTranslationCluster - The external Database cluster name where the database lives or false if not exists
'wmgContentTranslationCluster' => [ 'default' => 'extension1', 'testwiki' => false, ],
In ContentTranslation\LoadBalancer::getConnection, we have,
$lb = $this->contentTranslationCluster ? $this->lbFactory->getExternalLB( $this->contentTranslationCluster ) : $this->lbFactory->getMainLB( $this->contentTranslationDatabase ); return $lb->getConnection( $type, $group, $this->contentTranslationDatabase );
I'm planning to add two methods to get the primary database, and the replica database using the IConnectionProvider class.
Change #1152252 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):
[mediawiki/extensions/ContentTranslation@master] Replace usage of LoadBalancer::getConnection with virtual domain
Change #1153136 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):
[mediawiki/extensions/ContentTranslation@master] Replace LoadBalancer with ConnectionProvider
Change #1156376 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):
[mediawiki/extensions/ContentTranslation@master] SchemaHooks: Drop schema changes for MW <= 1.35
Change #1156769 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):
[mediawiki/extensions/ContentTranslation@master] SchemaHooks: Use addExtensionUpdateOnVirtualDomain method
Change #1159761 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):
[mediawiki/extensions/ContentTranslation@master] Remove unused cluster and database configurations
Change #1152068 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] Introduce usage of DatabaseVirtualDomains
Change #1152252 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] Replace usage of LoadBalancer::getConnection with virtual domain
Change #1161788 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):
[mediawiki/extensions/ContentTranslation@master] Remove unnecessary wait for database replication calls
Change #1153136 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] Replace LoadBalancer with ConnectionProvider
Change #1156376 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] SchemaHooks: Drop schema changes for MW <= 1.35
I've tested the latest changes on testwiki and I'm able to publish translations using CX successfully. I see an unrelated issue with the mobile editor:
I tested the changes with CX on Hebrew Wikipedia. Saving translations works as expected, and I was able to publish to my namespace.
We can proceed with merging the next set of patches.
FWIW, We've dropped support for upgrades from 1.36 and 1.37 if you want to clean those up too!
Change #1156769 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] SchemaHooks: Use addExtensionUpdateOnVirtualDomain method
Change #1165854 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):
[mediawiki/vagrant@master] CX: Use VirtualDomainMapping
Change #1165854 merged by jenkins-bot:
[mediawiki/vagrant@master] CX: Use VirtualDomainMapping
Change #1152065 merged by jenkins-bot:
[operations/mediawiki-config@master] CX: Add virtual-cx-shared DatabaseVirtualDomains
Mentioned in SAL (#wikimedia-operations) [2025-07-09T07:05:58Z] <kartik@deploy1003> Started scap sync-world: Backport for [[gerrit:1152065|CX: Add virtual-cx-shared DatabaseVirtualDomains (T348513)]]
Mentioned in SAL (#wikimedia-operations) [2025-07-09T07:08:08Z] <kartik@deploy1003> kartik, abi: Backport for [[gerrit:1152065|CX: Add virtual-cx-shared DatabaseVirtualDomains (T348513)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.
Mentioned in SAL (#wikimedia-operations) [2025-07-09T07:31:19Z] <kartik@deploy1003> Finished scap sync-world: Backport for [[gerrit:1152065|CX: Add virtual-cx-shared DatabaseVirtualDomains (T348513)]] (duration: 25m 21s)
Change #1159761 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] Remove unused cluster and database configurations
Change #1168757 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):
[operations/mediawiki-config@master] CX: Remove unused config related to database and cluster
Change #1168757 merged by jenkins-bot:
[operations/mediawiki-config@master] CX: Remove unused config related to database and cluster
Mentioned in SAL (#wikimedia-operations) [2025-07-17T07:45:00Z] <gkyziridis@deploy1003> Started scap sync-world: Backport for [[gerrit:1168757|CX: Remove unused config related to database and cluster (T348513)]]
Mentioned in SAL (#wikimedia-operations) [2025-07-17T07:47:19Z] <gkyziridis@deploy1003> gkyziridis, abi: Backport for [[gerrit:1168757|CX: Remove unused config related to database and cluster (T348513)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.
Mentioned in SAL (#wikimedia-operations) [2025-07-17T08:07:15Z] <gkyziridis@deploy1003> Finished scap sync-world: Backport for [[gerrit:1168757|CX: Remove unused config related to database and cluster (T348513)]] (duration: 22m 15s)
All changes are deployed.
We started using a virtual domain:
$wgVirtualDomainsMapping['virtual-cx'] = [ 'cluster' => 'extension1', 'db' => 'wikishared', ];
Two old configuration options were dropped:
- wgContentTranslationCluster
- wgContentTranslationDatabase
