Commit graph

7 commits

Author SHA1 Message Date
Umherirrender
3f1a52805e Use short type bool/int in param documentation
Enable the phpcs sniffs for this and used phpcbf

Change-Id: Iaa36687154ddd2bf663b9dd519f5c99409d37925
2017-08-20 13:20:59 +02:00
Aaron Schulz
62fcaecee3 Remove "memCache" field from LoadBalancer
The only user was LoadMonitor, which is converted to only use
the WAN and server caches. Previously, the lock() calls there
were useless since LBFactory never injected "memcCache" to
LoadBalancer, ergo making it EmptyBagOStuff in LoadMonitor.

Change-Id: I0c7793d47b93b763dee478d16fb87ec637dc6cab
2017-08-17 16:58:56 +00:00
Aaron Schulz
6494ea0ba0 Move ILoadBalancer to Rdbms namespace
All callers are in core and have been updated.
Other callers can now be switched from LoadBalancer type hints to
ILoadBalancer type hints. Once that migration is done, the classes
implementing it can be moved too.

Change-Id: I6b34099b5816dd8bf9646ed39f7a2d1960e2ed06
2017-02-07 23:22:36 -08:00
Aaron Schulz
2c7b26c169 Move LoadMonitor to Rdbms namespace
Change-Id: Icc178acb5ba0e21d1a8e857c43724c694c7ebeb1
2017-01-31 19:45:54 -08:00
Aaron Schulz
4154c688e8 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
2016-10-05 20:07:03 +00:00
Aaron Schulz
23909318c8 Implement scaleLoads() in LoadMonitorMySQL
* Recently pooled servers will get more traffic as
  their internal caches warm up by getting queries
* Also let LoadMonitor support options for flexibility
  The "loadMonitor" config field now takes in array in
  LoadBalancer.
* Make LoadMonitor the default instead of LoadMonitorNull.

Change-Id: I53b89b0c25bdcc30deec3f8b502fb14479c53ae8
2016-10-03 22:32:33 +00:00
Aaron Schulz
21a9bb06b4 Move LoadMonitorMySQL to LoadMonitor
* The LoadMonitor interface is now ILoadMonitor.
* Nothing in this code was MySQL specific.
  Now any DB type can benefit from a LoadMonitor.

Change-Id: I272a72cd55a70f99a866d518d44cb3bcaca91b9e
2016-09-15 23:56:39 +00:00