RedisBagOStuff: if no alternatives, skip master link status check
authorOri Livneh <ori@wikimedia.org>
Tue, 28 Jul 2015 23:22:57 +0000 (16:22 -0700)
committerOri Livneh <ori@wikimedia.org>
Tue, 28 Jul 2015 23:22:57 +0000 (16:22 -0700)
commit1d526cae8112bdedbe03218ef0be6a4cd60d78d7
tree4ab2769ca793d14547c13cc6dfafa69c7e5a3d84
parentf6256282b983bb19e081714e1c70214b087cb23d
RedisBagOStuff: if no alternatives, skip master link status check

If RedisBagOStuff::getConnection() is able to establish a connection, only
check the master link status if automatic failover is enabled and if there are
other viable servers left to consider. If there are no servers left to
consider, or if automatic failover is not configured, just return the
connection handle without subjecting it to further tests.

This will have the side-effect of making RedisBagOStuff compatible with
Nutcracker, which does not implement the INFO command. This is because when
MediaWiki is configured to use Nutcracker, the server pool will consist of a
single server (namely, Nutcracker itself), and thus there will be no other
server to consider, so INFO will never be executed.

Change-Id: I3812ec5a0b22df122bdf44350bc0496574c02ce8
includes/objectcache/RedisBagOStuff.php