Clean up getLagTimes() docs
authorAaron Schulz <aschulz@wikimedia.org>
Fri, 2 Oct 2015 00:14:35 +0000 (17:14 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Fri, 2 Oct 2015 19:35:55 +0000 (19:35 +0000)
Change-Id: Icc11619136b6ed10f507e25cd0798da975af4ad1

includes/db/loadbalancer/LoadBalancer.php
includes/db/loadbalancer/LoadMonitor.php

index 3fcd349..a0ef753 100644 (file)
@@ -1221,12 +1221,14 @@ class LoadBalancer {
        }
 
        /**
-        * Get lag time for each server
+        * Get an estimate of replication lag (in seconds) for each server
         *
         * Results are cached for a short time in memcached/process cache
         *
+        * Values may be "false" if replication is too broken to estimate
+        *
         * @param string|bool $wiki
-        * @return int[] Map of (server index => seconds)
+        * @return int[] Map of (server index => float|int|bool)
         */
        public function getLagTimes( $wiki = false ) {
                if ( $this->getServerCount() <= 1 ) {
index 03ce787..438e4fc 100644 (file)
@@ -43,12 +43,14 @@ interface LoadMonitor {
        public function scaleLoads( &$loads, $group = false, $wiki = false );
 
        /**
-        * Return an estimate of replication lag for each server
+        * Get an estimate of replication lag (in seconds) for each server
+        *
+        * Values may be "false" if replication is too broken to estimate
         *
         * @param array $serverIndexes
         * @param string $wiki
         *
-        * @return array Map of (server index => seconds)
+        * @return array Map of (server index => float|int|bool)
         */
        public function getLagTimes( $serverIndexes, $wiki );