Most of the time the early $this->mReadIndex inside getReaderIndex()
should be a hit, in which case this message isn't very useful.
This one message was filling up over 60% of the build logs (496/720 lines).
> LoadBalancer::getConnection: using server for group ''
Move it to further down in getReaderIndex() where it actually
tries and finds one.
Change-Id: Id572f2bb3a905e095fcc929a9e2c17f40f7b1b6e
if ( $this->mReadIndex <= 0 && $this->mLoads[$i] > 0 && $group === false ) {
$this->mReadIndex = $i;
}
+ $serverName = $this->getServerName( $i );
+ wfDebug( __METHOD__ . ": using server $serverName for group '$group'\n" );
}
return $i;
foreach ( $groups as $group ) {
$groupIndex = $this->getReaderIndex( $group, $wiki );
if ( $groupIndex !== false ) {
- $serverName = $this->getServerName( $groupIndex );
- wfDebug( __METHOD__ . ": using server $serverName for group '$group'\n" );
$i = $groupIndex;
break;
}