Downgrade 'found writes/callbacks pending.' from error to info
[lhc/web/wiklou.git] / includes / libs / rdbms / loadbalancer / LoadBalancer.php
index 1202831..0b70010 100644 (file)
@@ -269,11 +269,11 @@ class LoadBalancer implements ILoadBalancer {
                                $host = $this->getServerName( $i );
                                if ( $lag === false && !is_infinite( $maxServerLag ) ) {
                                        $this->replLogger->error(
-                                               "Server {host} (#$i) is not replicating?", [ 'host' => $host ] );
+                                               "Server {host} is not replicating?", [ 'host' => $host ] );
                                        unset( $loads[$i] );
                                } elseif ( $lag > $maxServerLag ) {
                                        $this->replLogger->warning(
-                                               "Server {host} (#$i) has {lag} seconds of lag (>= {maxlag})",
+                                               "Server {host} has {lag} seconds of lag (>= {maxlag})",
                                                [ 'host' => $host, 'lag' => $lag, 'maxlag' => $maxServerLag ]
                                        );
                                        unset( $loads[$i] );
@@ -1033,7 +1033,11 @@ class LoadBalancer implements ILoadBalancer {
                return ( $name != '' ) ? $name : 'localhost';
        }
 
+       /**
+        * @deprecated Since 1.30, no alternative
+        */
        public function getServerInfo( $i ) {
+               wfDeprecated( __METHOD__, '1.30' );
                if ( isset( $this->mServers[$i] ) ) {
                        return $this->mServers[$i];
                } else {
@@ -1041,7 +1045,11 @@ class LoadBalancer implements ILoadBalancer {
                }
        }
 
+       /**
+        * @deprecated Since 1.30, construct new object
+        */
        public function setServerInfo( $i, array $serverInfo ) {
+               wfDeprecated( __METHOD__, '1.30' );
                $this->mServers[$i] = $serverInfo;
        }
 
@@ -1249,7 +1257,7 @@ class LoadBalancer implements ILoadBalancer {
                                // This happens if onTransactionIdle() callbacks leave callbacks on *another* DB
                                // (which finished its callbacks already). Warn and recover in this case. Let the
                                // callbacks run in the final commitMasterChanges() in LBFactory::shutdown().
-                               $this->queryLogger->error( __METHOD__ . ": found writes/callbacks pending." );
+                               $this->queryLogger->info( __METHOD__ . ": found writes/callbacks pending." );
                                return;
                        } elseif ( $conn->trxLevel() ) {
                                // This happens for single-DB setups where DB_REPLICA uses the master DB,