Simplify some LoadBalancer methods that do iteration
authorAaron Schulz <aschulz@wikimedia.org>
Sun, 11 Sep 2016 03:10:41 +0000 (20:10 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Sun, 11 Sep 2016 13:27:14 +0000 (06:27 -0700)
commit3f4215b7ec958417c1a7012d1205974a1d29f5b4
treeed409f3a0a356b03d84dd135b259ccdb1ea44c3d
parent8cf47509be6e9eeb8e14fbc869007f471b36b7b4
Simplify some LoadBalancer methods that do iteration

Use foreachOpenConnection() and foreachOpenMasterConnection() in
more methods rather that copying that code. Also made the logic
for closeConnection() simpler by using the "serverIndex" field LB
always sets on the connection handles.

Change-Id: I5cb66da2395773d64b84d4115cbcdfc69c9e5e00
includes/db/loadbalancer/LoadBalancer.php