jenkins-bot has submitted this change and it was merged.
Change subject: Clean up some wfDebug() calls in LoadBalancer
......................................................................
Clean up some wfDebug() calls in LoadBalancer
Change-Id: I01143bec5b084a32c3edd836d194c0a17ca0e43c
---
M includes/db/loadbalancer/LoadBalancer.php
1 file changed, 5 insertions(+), 10 deletions(-)
Approvals:
Reedy: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/db/loadbalancer/LoadBalancer.php
b/includes/db/loadbalancer/LoadBalancer.php
index afd4ba8..19b2d1c 100644
--- a/includes/db/loadbalancer/LoadBalancer.php
+++ b/includes/db/loadbalancer/LoadBalancer.php
@@ -208,8 +208,6 @@
return false;
}
- # wfDebugLog( 'connect', var_export( $loads, true ) );
-
# Return a random representative of the remainder
return ArrayUtils::pickRandom( $loads );
}
@@ -247,7 +245,7 @@
$nonErrorLoads = $this->mGroupLoads[$group];
} else {
# No loads for this group, return false and the
caller can use some other group
- wfDebug( __METHOD__ . ": no loads for group
$group\n" );
+ wfDebugLog( 'connect', __METHOD__ . ": no loads
for group $group\n" );
return false;
}
@@ -347,7 +345,8 @@
}
}
$serverName = $this->getServerName( $i );
- wfDebug( __METHOD__ . ": using server $serverName for
group '$group'\n" );
+ wfDebugLog( 'connect', __METHOD__ .
+ ": using server $serverName for group
'$group'\n" );
}
return $i;
@@ -686,10 +685,10 @@
$conn = $this->reallyOpenConnection( $server, false );
$serverName = $this->getServerName( $i );
if ( $conn->isOpen() ) {
- wfDebug( "Connected to database $i at
$serverName\n" );
+ wfDebugLog( 'connect', "Connected to database
$i at $serverName\n" );
$this->mConns['local'][$i][0] = $conn;
} else {
- wfDebug( "Failed to connect to database $i at
$serverName\n" );
+ wfDebugLog( 'connect', "Failed to connect to
database $i at $serverName\n" );
$this->mErrorConnection = $conn;
$conn = false;
}
@@ -964,14 +963,10 @@
for ( $i = 1; $i < $serverCount; $i++ ) {
$conn = $this->getAnyOpenConnection( $i );
if ( $conn ) {
- wfDebug( "Master pos fetched from
slave\n" );
-
return $conn->getSlavePos();
}
}
} else {
- wfDebug( "Master pos fetched from master\n" );
-
return $masterConn->getMasterPos();
}
--
To view, visit https://gerrit.wikimedia.org/r/252896
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I01143bec5b084a32c3edd836d194c0a17ca0e43c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Parent5446 <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits