Make LoadMonitor use $serverIndexes in the cache key
authorAaron Schulz <aschulz@wikimedia.org>
Wed, 5 Oct 2016 19:47:10 +0000 (12:47 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Wed, 5 Oct 2016 20:07:03 +0000 (20:07 +0000)
commit4154c688e898360fa2f024da5452d29db1241848
tree97c716dfc280450c868057db18c5dcde16125924
parent75d8b6c6cd2b70d98242e1246678c12e973a5dfa
Make LoadMonitor use $serverIndexes in the cache key

* This avoids collisions of generic and custom LB group
  server list keys, which could cause warnings and errors.
* Remove $group param from scaleLoads(), which was unused
  and less robust for making keys anyway.
* Remove clearCaches() method, which only had one caller
  in a script that printed lag times in a loop. Its not
  worth keeping and having to pass in the server index
  list.
* Also guard scaleLoads() against recent server additions.

Bug: T147359
Change-Id: Idd15f0bebb68782fda36f483880cf7fe9673b940
includes/libs/rdbms/loadbalancer/ILoadBalancer.php
includes/libs/rdbms/loadbalancer/LoadBalancer.php
includes/libs/rdbms/loadmonitor/ILoadMonitor.php
includes/libs/rdbms/loadmonitor/LoadMonitor.php
includes/libs/rdbms/loadmonitor/LoadMonitorNull.php
maintenance/lag.php