X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=includes%2Flibs%2Frdbms%2Floadmonitor%2FLoadMonitorMySQL.php;h=98cff6d77aa8d1d649187f7665d45e9cd1505a77;hb=74426f3cf796b149f1ae445e41815bbe148640b2;hp=ff72dbc96f8fe2fd071b1e9f854551d5f7300f62;hpb=d42d6bd868fd5b579080639995e6a7e23851fcf3;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/libs/rdbms/loadmonitor/LoadMonitorMySQL.php b/includes/libs/rdbms/loadmonitor/LoadMonitorMySQL.php index ff72dbc96f..98cff6d77a 100644 --- a/includes/libs/rdbms/loadmonitor/LoadMonitorMySQL.php +++ b/includes/libs/rdbms/loadmonitor/LoadMonitorMySQL.php @@ -22,6 +22,7 @@ namespace Wikimedia\Rdbms; use BagOStuff; +use WANObjectCache; /** * Basic MySQL load monitor with no external dependencies @@ -34,9 +35,9 @@ class LoadMonitorMySQL extends LoadMonitor { private $warmCacheRatio; public function __construct( - ILoadBalancer $lb, BagOStuff $srvCache, BagOStuff $cache, array $options = [] + ILoadBalancer $lb, BagOStuff $srvCache, WANObjectCache $wCache, array $options = [] ) { - parent::__construct( $lb, $srvCache, $cache, $options ); + parent::__construct( $lb, $srvCache, $wCache, $options ); $this->warmCacheRatio = isset( $options['warmCacheRatio'] ) ? $options['warmCacheRatio'] @@ -45,7 +46,7 @@ class LoadMonitorMySQL extends LoadMonitor { protected function getWeightScale( $index, IDatabase $conn = null ) { if ( !$conn ) { - return 0.0; + return parent::getWeightScale( $index, $conn ); } $weight = 1.0;