Page MenuHomePhabricator

Use DomainDB abstraction in all places in Wikibase where DB connections are created or ILBFactory / ILoadBalancer are otherwise used
Closed, ResolvedPublic

Description

In T283354 a new abstraction was created to have a clearer boundary between MediaWiki and Wikibase. This abstraction should now be used in all places that are currently using ILBFactory or ILoadBalancer directly.

The child tasks of this task should cover almost every usage in Wikibase. Some places might require some more refactoring or limited extending of the new DbDomain class. Tickets for the remaining usages should be created once the current tickets are mostly implemented and a path forward is more clear.

We may want to consider adding another ticket for creating a test that asserts that LBFactory etc. is not used outside these services. For comparison see the Forbidden Client/Repo usage tests. => T286209: Create a tests to prevent unexpected usage of ILoadBalancer and ILBFactory instances in Wikibase

⇉ More or less all usage of load balancer and load balancer factories except usage in the services for the new DbDomain factories should be refactored away: https://codesearch.wmcloud.org/extensions/?q=getDBLoadBalancer&i=nope&files=&excludeFiles=tests&repos=Extension:Wikibase

Related Objects

StatusSubtypeAssignedTask
ResolvedAddshore
ResolvedAddshore
ResolvedMichael
Resolved toan
ResolvedMichael
ResolvedLucas_Werkmeister_WMDE
ResolvedLadsgroup
ResolvedLucas_Werkmeister_WMDE
ResolvedItamarWMDE
ResolvedJakob_WMDE
ResolvedMichael
ResolvedLadsgroup
ResolvedJakob_WMDE
ResolvedJakob_WMDE
ResolvedMichael
ResolvedJakob_WMDE
ResolvedLadsgroup
ResolvedLadsgroup
ResolvedItamarWMDE
ResolvedLadsgroup
ResolvedItamarWMDE
Resolveddang
ResolvedLucas_Werkmeister_WMDE
ResolvedLadsgroup
ResolvedLucas_Werkmeister_WMDE
ResolvedLucas_Werkmeister_WMDE
ResolvedLucas_Werkmeister_WMDE
Resolved toan
Resolved toan
ResolvedLucas_Werkmeister_WMDE
ResolvedLadsgroup
ResolvedLucas_Werkmeister_WMDE
ResolvedLadsgroup
ResolvedLadsgroup
ResolvedLadsgroup
ResolvedLadsgroup
ResolvedLadsgroup
ResolvedLadsgroup
ResolvedLadsgroup
ResolvedLadsgroup
ResolvedLadsgroup
ResolvedLadsgroup
ResolvedLadsgroup

Event Timeline

Things that do not strictly fall under this ticket as usage and so do not have a subtask (yet):

  • LBFactory mentioned in config in WikibaseClient.example.php
  • LBFactory mentioned in DataUpdateHookHandler comment: * @param mixed $ticket Prior result of LBFactory::getEmptyTransactionTicket()
  • ChangesListSpecialPageHookHandler::factory and SpecialUnconnectedPages get an ILoadBalancer injected via the extension-client.json - what do we do with that?
Michael renamed this task from Create tasks for all places in Wikibase where DB connections are created/used to Use DomainDB abstraction in all places in Wikibase where DB connections are created or ILBFactory / ILoadBalancer are otherwise used.May 31 2021, 9:14 AM
Michael removed Michael as the assignee of this task.
Michael updated the task description. (Show Details)

We forgot about wfGetDB(). I'll be creating a couple more subtasks...

Addshore claimed this task.
Addshore subscribed.

All subtasks closed