As repeatedly requested, Wikibase should only connect to the dump database group in the (long running) dump scripts (repo/maintenance/dumpEntities.php, repo/maintenance/dumpJson.php and repo/maintenance/dumpRdf.php).
We have a few options to implement this:
- Try to pass the db group (as string) to all classes that get database connections?
- Create an own (static?) wrapper which we can use instead of wfGetDB (and wfGetLB/ the analog function on MediaWikiServices?)?
- Propose a core patch to be able to change the default for $groups in LoadBalancer::getConnection.
I'm not sure about this… all options seem kind of dirty in their own way, except maybe the third, if properly thought through.