r91151 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91150‎ | r91151 | r91152 >
Date:01:27, 30 June 2011
Author:reedy
Status:ok
Tags:
Comment:
Merge r90664 from 1.17wmf1
Modified paths:
  • /trunk/phase3/includes/db/LoadMonitor.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/db/LoadMonitor.php
@@ -18,7 +18,7 @@
1919 * @param LoadBalancer $parent
2020 */
2121 function __construct( $parent );
22 -
 22+
2323 /**
2424 * Perform pre-connection load ratio adjustment.
2525 * @param $loads array
@@ -30,13 +30,13 @@
3131 /**
3232 * Perform post-connection backoff.
3333 *
34 - * If the connection is in overload, this should return a backoff factor
35 - * which will be used to control polling time. The number of threads
 34+ * If the connection is in overload, this should return a backoff factor
 35+ * which will be used to control polling time. The number of threads
3636 * connected is a good measure.
3737 *
3838 * If there is no overload, zero can be returned.
3939 *
40 - * A threshold thread count is given, the concrete class may compare this
 40+ * A threshold thread count is given, the concrete class may compare this
4141 * to the running thread count. The threshold may be false, which indicates
4242 * that the sysadmin has not configured this feature.
4343 *
@@ -50,7 +50,7 @@
5151 *
5252 * @param $serverIndexes
5353 * @param $wiki
54 - *
 54+ *
5555 * @return array
5656 */
5757 function getLagTimes( $serverIndexes, $wiki );
@@ -113,7 +113,7 @@
114114 global $wgMemc;
115115 if ( empty( $wgMemc ) )
116116 $wgMemc = wfGetMainCache();
117 -
 117+
118118 $masterName = $this->parent->getServerName( 0 );
119119 $memcKey = wfMemcKey( 'lag_times', $masterName );
120120 $times = $wgMemc->get( $memcKey );
@@ -167,6 +167,8 @@
168168 }
169169 $status = $conn->getMysqlStatus("Thread%");
170170 if ( $status['Threads_running'] > $threshold ) {
 171+ $server = $conn->getProperty( 'mServer' );
 172+ wfLogDBError( "LB backoff from $server - Threads_running = {$status['Threads_running']}\n" );
171173 return $status['Threads_connected'];
172174 } else {
173175 return 0;

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r90664more logging around LB max threads backoffasher16:56, 23 June 2011

Status & tagging log