[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Remove unused DB position values in LoadBalancer

2016-09-05 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Remove unused DB position values in LoadBalancer
..


Remove unused DB position values in LoadBalancer

Also fixed IDEA error about useless $conn declaration.

Change-Id: I73572cb201e44db45fbe9bdb8e06bff4b50cecb2
---
M includes/db/loadbalancer/LoadBalancer.php
1 file changed, 1 insertion(+), 5 deletions(-)

Approvals:
  Smalyshev: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/db/loadbalancer/LoadBalancer.php 
b/includes/db/loadbalancer/LoadBalancer.php
index 7ca0b33..d3a2902 100644
--- a/includes/db/loadbalancer/LoadBalancer.php
+++ b/includes/db/loadbalancer/LoadBalancer.php
@@ -284,7 +284,6 @@
 
# No server found yet
$i = false;
-   $conn = false;
# First try quickly looking through the available servers for a 
server that
# meets our criteria
$currentLoads = $nonErrorLoads;
@@ -353,9 +352,7 @@
# Replica DB connection successful.
# Wait for the session master pos for a short time.
if ( $this->mWaitForPos && $i > 0 ) {
-   if ( !$this->doWait( $i ) ) {
-   $this->mServers[$i]['slave pos'] = 
$conn->getSlavePos();
-   }
+   $this->doWait( $i );
}
if ( $this->mReadIndex <= 0 && $this->mLoads[$i] > 0 && 
$group === false ) {
$this->mReadIndex = $i;
@@ -384,7 +381,6 @@
 
if ( $i > 0 ) {
if ( !$this->doWait( $i ) ) {
-   $this->mServers[$i]['slave pos'] = 
$this->getAnyOpenConnection( $i )->getSlavePos();
$this->laggedReplicaMode = true;
}
}

-- 
To view, visit https://gerrit.wikimedia.org/r/308362
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I73572cb201e44db45fbe9bdb8e06bff4b50cecb2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Gilles 
Gerrit-Reviewer: Parent5446 
Gerrit-Reviewer: Smalyshev 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Remove unused DB position values in LoadBalancer

2016-09-03 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/308362

Change subject: Remove unused DB position values in LoadBalancer
..

Remove unused DB position values in LoadBalancer

Also fixed IDEA error about useless $conn declaration.

Change-Id: I73572cb201e44db45fbe9bdb8e06bff4b50cecb2
---
M includes/db/loadbalancer/LoadBalancer.php
1 file changed, 1 insertion(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/62/308362/1

diff --git a/includes/db/loadbalancer/LoadBalancer.php 
b/includes/db/loadbalancer/LoadBalancer.php
index 7ca0b33..d3a2902 100644
--- a/includes/db/loadbalancer/LoadBalancer.php
+++ b/includes/db/loadbalancer/LoadBalancer.php
@@ -284,7 +284,6 @@
 
# No server found yet
$i = false;
-   $conn = false;
# First try quickly looking through the available servers for a 
server that
# meets our criteria
$currentLoads = $nonErrorLoads;
@@ -353,9 +352,7 @@
# Replica DB connection successful.
# Wait for the session master pos for a short time.
if ( $this->mWaitForPos && $i > 0 ) {
-   if ( !$this->doWait( $i ) ) {
-   $this->mServers[$i]['slave pos'] = 
$conn->getSlavePos();
-   }
+   $this->doWait( $i );
}
if ( $this->mReadIndex <= 0 && $this->mLoads[$i] > 0 && 
$group === false ) {
$this->mReadIndex = $i;
@@ -384,7 +381,6 @@
 
if ( $i > 0 ) {
if ( !$this->doWait( $i ) ) {
-   $this->mServers[$i]['slave pos'] = 
$this->getAnyOpenConnection( $i )->getSlavePos();
$this->laggedReplicaMode = true;
}
}

-- 
To view, visit https://gerrit.wikimedia.org/r/308362
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I73572cb201e44db45fbe9bdb8e06bff4b50cecb2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits