From c2602eaed5c726e1b78cc9ecb55a94392e923642 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Fri, 7 Oct 2016 15:05:22 -0700 Subject: [PATCH] LoadMonitor: Avoid "host not replicating?" log messages by checking "is static" Change-Id: I59c47038505558b141385ea48cb62461163adb37 --- includes/libs/rdbms/loadmonitor/LoadMonitor.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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 ) { -- 2.20.1