Merge "LoadMonitor: Avoid "host not replicating?" log messages by checking "is static""
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Sat, 8 Oct 2016 01:54:35 +0000 (01:54 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Sat, 8 Oct 2016 01:54:35 +0000 (01:54 +0000)
includes/libs/rdbms/loadmonitor/LoadMonitor.php

index 499542d..99c9126 100644 (file)
@@ -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 ) {