rdbms: avoid LoadBalancer::getConnection waste when using $groups
authorAaron Schulz <aschulz@wikimedia.org>
Wed, 8 May 2019 19:18:01 +0000 (12:18 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Thu, 13 Jun 2019 19:09:48 +0000 (20:09 +0100)
commit7b1e345abc4cfe38f63135a016172cfd0340763f
treec2e9ac6f571ba955c83cb1ce4da220fbe4023fbc
parent5f225fc96b2124dfbcde39796714892295bf91e0
rdbms: avoid LoadBalancer::getConnection waste when using $groups

Add a "readIndexByGroup" field that does the same thing that the
generic read index does except for query grouped connections.

Also remove some pointless checks at the end of getReaderIndex().

Change-Id: I3bd6295be4355ee930960f89ccb07811dd8c5545
includes/libs/rdbms/loadbalancer/LoadBalancer.php
tests/phpunit/includes/db/LoadBalancerTest.php