From: Aaron Schulz Date: Wed, 9 Jul 2014 19:11:32 +0000 (-0700) Subject: Made getMaxLag() skip checking the master DB X-Git-Tag: 1.31.0-rc.0~14994^2 X-Git-Url: https://git.cyclocoop.org/%7B%7B%20url_for%28?a=commitdiff_plain;h=faaf616549058f4709e4fac34e1140c664c96fff;p=lhc%2Fweb%2Fwiklou.git Made getMaxLag() skip checking the master DB Change-Id: I81a9102570bf9a45af56f31d04e3a0f2be72b919 --- diff --git a/includes/db/LoadBalancer.php b/includes/db/LoadBalancer.php index b3f9210120..0c4188ceda 100644 --- a/includes/db/LoadBalancer.php +++ b/includes/db/LoadBalancer.php @@ -1050,6 +1050,9 @@ class LoadBalancer { $maxIndex = 0; if ( $this->getServerCount() > 1 ) { // no replication = no lag foreach ( $this->mServers as $i => $conn ) { + if ( $i == $this->getWriterIndex() ) { + continue; // nothing to check + } $conn = false; if ( $wiki === false ) { $conn = $this->getAnyOpenConnection( $i );