Commit graph

13 commits

Author SHA1 Message Date
Bartosz Dziewoński
485f66f174 Use PHP 7 '??' operator instead of '?:' with 'isset()' where convenient
Find: /isset\(\s*([^()]+?)\s*\)\s*\?\s*\1\s*:\s*/
Replace with: '\1 ?? '

(Everywhere except includes/PHPVersionCheck.php)
(Then, manually fix some line length and indentation issues)

Then manually reviewed the replacements for cases where confusing
operator precedence would result in incorrect results
(fixing those in I478db046a1cc162c6767003ce45c9b56270f3372).

Change-Id: I33b421c8cb11cdd4ce896488c9ff5313f03a38cf
2018-05-30 18:06:13 -07:00
Aaron Schulz
1e5b413259 rdbms: fix bogus $fname parameter in LoadMonitorMySQL
Change-Id: Ib8862532362da148ddd6296646fba7483c6463d5
2018-03-20 07:46:16 -07:00
Aaron Schulz
bea3a7c88e Use parent function in mysql DB class in getWeightScale()
May as well keep this case in sync with the base class

Change-Id: I4c62c3247ec3372c6a274b889fac1b7a883f5cf5
2017-11-30 14:10:29 -08: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
488a647831 Move IDatabase/IMaintainableDatabase to Rdbms namespace
Change-Id: If7e8a8ff574661fd827de8bcec11d2c39a687300
2017-03-28 15:32:38 -07: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
bccc483cbe Ignore query cache in LoadMonitorMySQL
Change-Id: I0b3c27ca6d2f8805297d91557cc40bd4bbc1a677
2016-12-02 01:09:44 -08:00
Fomafix
202f695f67 Update weblinks in comments from HTTP to HTTPS
Use HTTPS instead of HTTP where the HTTP link is a redirect to the HTTPS link.

Also update some defect links.

Change-Id: Ic3a5eac910d098ed5c2a21e9f47c9b6ee06b2643
2016-11-07 15:24:46 +01: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
Aaron Schulz
b055fbda7e More DB related class cleanups to prepare files for /libs
* Cleaned up some related logging bits.
* Avoid some wf* methods in LoadBalancer.

Change-Id: I5da97174441c086e61ffc120889c068e241ebfd2
2016-09-15 00:07:55 +00:00
Aaron Schulz
9c8d885060 Move LoadMonitor classes to libs/rdbms/loadmonitor
Change-Id: Ib18108f24ff8b9d05dc324bad132f597b3e2ddef
2016-09-14 10:56:52 +00:00
Renamed from includes/db/loadbalancer/LoadMonitorMySQL.php (Browse further)