Last modified: 2014-04-25 11:53:29 UTC
Got an error just now after MediaWiki upgrade.
This is caused by 210edff11b37ebb5b1439a2a1eb454cbac21565e
(In reply to Liangent from comment #1) > This is caused by 210edff11b37ebb5b1439a2a1eb454cbac21565e CC'ing author and reviewer of that patch
(In reply to Liangent from comment #0) > Got an error just now after MediaWiki upgrade. What error did you get with which configuration? We thought we'd covered B/C (and AFAIK it ran successfully on Wikimedia wikis).
(In reply to Siebrand Mazeland from comment #3) > (In reply to Liangent from comment #0) > > Got an error just now after MediaWiki upgrade. > > What error did you get with which configuration? We thought we'd covered B/C > (and AFAIK it ran successfully on Wikimedia wikis). I have a class LBFactory_Foo extends LBFactory_Multi, and LBFactory_Foo is used in configurations instead of LBFactory_Multi... IIRC we've used some thing like class LBFactory_Multi extends LBFactoryMulti {} for B/C classes somewhere. Is this method deprecated?
(In reply to Liangent from comment #4) > I have a class LBFactory_Foo extends LBFactory_Multi, and LBFactory_Foo is > used in configurations instead of LBFactory_Multi... > > IIRC we've used some thing like class LBFactory_Multi extends LBFactoryMulti > {} for B/C classes somewhere. Is this method deprecated? We took care of B/C for configuration and extensions overriding load balancer classes that were in Gerrit. It's noted in the release notes that the classes were renamed. We didn't take care of custom code not in Gerrit repos. So should we fix or wontfix?
Hmm hard to tell whether my code is "configuration" or "extension" :/ I'm running MediaWiki on ToolLab-replicated database, and the following is my code snippet. I can't remember the exact reason that these lines are needed, but I believe that it's due to some inflexibility in "normal" configurations... <?php class LBFactory_Labs extends LBFactoryMulti { # To use a customized LoadBalancer class function newLoadBalancer( $template, $loads, $groupLoads ) { global $wgMasterWaitTimeout; $servers = $this->makeServerArray( $template, $loads, $groupLoads ); $lb = new LoadBalancerLabs( array( 'servers' => $servers, 'masterWaitTimeout' => $wgMasterWaitTimeout )); return $lb; } } class LoadBalancerLabs extends LoadBalancer { # Ignore $dbNameOverride. dbnames are already specified per server function reallyOpenConnection( $server, $dbNameOverride = false ) { return parent::reallyOpenConnection( $server ); } }