https://bugzilla.wikimedia.org/show_bug.cgi?id=28583
Reedy <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #8423|0 |1 is obsolete| | --- Comment #17 from Reedy <[email protected]> 2011-04-18 23:05:33 UTC --- Comment on attachment 8423 --> https://bugzilla.wikimedia.org/attachment.cgi?id=8423 Fix for LoadBalancer.php >Index: maintenance/eval.php >=================================================================== >--- maintenance/eval.php (revision 86345) >+++ maintenance/eval.php (working copy) >@@ -45,8 +45,11 @@ > } > if ( $d > 1 ) { > $lb = wfGetLB(); >- foreach ( $lb->mServers as $i => $server ) { >- $lb->mServers[$i]['flags'] |= DBO_DEBUG; >+ $serverCount = $lb->getServerCount(); >+ for ( $i = 0; $i < $serverCount; $i++ ) { >+ $server = $lb->getServerInfo( $i ); >+ $server['flags'] |= DBO_DEBUG; >+ $lb->setServerInfo( $i, $server ); > } > } > if ( $d > 2 ) { >Index: includes/db/LoadBalancer.php >=================================================================== >--- includes/db/LoadBalancer.php (revision 86345) >+++ includes/db/LoadBalancer.php (working copy) >@@ -13,13 +13,13 @@ > * @ingroup Database > */ > class LoadBalancer { >- /* private */ var $mServers, $mConns, $mLoads, $mGroupLoads; >- /* private */ var $mErrorConnection; >- /* private */ var $mReadIndex, $mAllowLagged; >- /* private */ var $mWaitForPos, $mWaitTimeout; >- /* private */ var $mLaggedSlaveMode, $mLastError = 'Unknown error'; >- /* private */ var $mParentInfo, $mLagTimes; >- /* private */ var $mLoadMonitorClass, $mLoadMonitor; >+ private $mServers, $mConns, $mLoads, $mGroupLoads; >+ private $mErrorConnection; >+ private $mReadIndex, $mAllowLagged; >+ private $mWaitForPos, $mWaitTimeout; >+ private $mLaggedSlaveMode, $mLastError = 'Unknown error'; >+ private $mParentInfo, $mLagTimes; >+ private $mLoadMonitorClass, $mLoadMonitor; > > /** > * @param $params Array with keys: >@@ -740,6 +740,13 @@ > } > > /** >+ * Sets the server info structure for the given index. Entry at index >$i is created if it doesn't exist >+ */ >+ function getServerInfo( $i, $serverInfo ) { >+ $this->mServers[i] = $serverInfo; >+ } >+ >+ /** > * Get the current master position for chronology control purposes > * @return mixed > */ -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
