dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Warn if stateful ParserOutput transforms are used"
[lhc/web/wiklou.git]
/
includes
/
libs
/
rdbms
/
loadmonitor
/
LoadMonitorMySQL.php
diff --git
a/includes/libs/rdbms/loadmonitor/LoadMonitorMySQL.php
b/includes/libs/rdbms/loadmonitor/LoadMonitorMySQL.php
index
ff72dbc
..
98cff6d
100644
(file)
--- a/
includes/libs/rdbms/loadmonitor/LoadMonitorMySQL.php
+++ b/
includes/libs/rdbms/loadmonitor/LoadMonitorMySQL.php
@@
-22,6
+22,7
@@
namespace Wikimedia\Rdbms;
use BagOStuff;
namespace Wikimedia\Rdbms;
use BagOStuff;
+use WANObjectCache;
/**
* Basic MySQL load monitor with no external dependencies
/**
* Basic MySQL load monitor with no external dependencies
@@
-34,9
+35,9
@@
class LoadMonitorMySQL extends LoadMonitor {
private $warmCacheRatio;
public function __construct(
private $warmCacheRatio;
public function __construct(
- ILoadBalancer $lb, BagOStuff $srvCache,
BagOStuff $c
ache, array $options = []
+ ILoadBalancer $lb, BagOStuff $srvCache,
WANObjectCache $wC
ache, array $options = []
) {
) {
- parent::__construct( $lb, $srvCache, $
c
ache, $options );
+ parent::__construct( $lb, $srvCache, $
wC
ache, $options );
$this->warmCacheRatio = isset( $options['warmCacheRatio'] )
? $options['warmCacheRatio']
$this->warmCacheRatio = isset( $options['warmCacheRatio'] )
? $options['warmCacheRatio']
@@
-45,7
+46,7
@@
class LoadMonitorMySQL extends LoadMonitor {
protected function getWeightScale( $index, IDatabase $conn = null ) {
if ( !$conn ) {
protected function getWeightScale( $index, IDatabase $conn = null ) {
if ( !$conn ) {
- return
0.0
;
+ return
parent::getWeightScale( $index, $conn )
;
}
$weight = 1.0;
}
$weight = 1.0;