From: Aaron Schulz Date: Fri, 7 Oct 2016 22:05:22 +0000 (-0700) Subject: LoadMonitor: Avoid "host not replicating?" log messages by checking "is static" X-Git-Tag: 1.31.0-rc.0~5175^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/?a=commitdiff_plain;h=c2602eaed5c726e1b78cc9ecb55a94392e923642;p=lhc%2Fweb%2Fwiklou.git LoadMonitor: Avoid "host not replicating?" log messages by checking "is static" Change-Id: I59c47038505558b141385ea48cb62461163adb37 --- diff --git a/includes/libs/rdbms/loadmonitor/LoadMonitor.php b/includes/libs/rdbms/loadmonitor/LoadMonitor.php index 499542dd4a..99c9126318 100644 --- a/includes/libs/rdbms/loadmonitor/LoadMonitor.php +++ b/includes/libs/rdbms/loadmonitor/LoadMonitor.php @@ -160,10 +160,14 @@ class LoadMonitor implements ILoadMonitor { continue; } - $lagTimes[$i] = $conn->getLag(); - if ( $lagTimes[$i] === false ) { - $host = $this->parent->getServerName( $i ); - $this->replLogger->error( __METHOD__ . ": host $host is not replicating?" ); + if ( $conn->getLBInfo( 'is static' ) ) { + $lagTimes[$i] = 0; + } else { + $lagTimes[$i] = $conn->getLag(); + if ( $lagTimes[$i] === false ) { + $host = $this->parent->getServerName( $i ); + $this->replLogger->error( __METHOD__ . ": host $host is not replicating?" ); + } } if ( $close ) {