Made wfReadOnly() more robust at handling the lagged-slave case
authorAaron Schulz <aschulz@wikimedia.org>
Tue, 7 Apr 2015 18:04:17 +0000 (11:04 -0700)
committerOri.livneh <ori@wikimedia.org>
Wed, 8 Apr 2015 18:41:57 +0000 (18:41 +0000)
commit01a5c6013e4a59815678b56bea21b94c0975d338
tree0d6e1bb0ed9aae34135413abbfdc5dfc1b43eed4
parent39e5a55e7ae8c45c8ce55d9f1ab2a94b20d1278e
Made wfReadOnly() more robust at handling the lagged-slave case

* Previously if it was called before a DB_SLAVE connection, it would not
  be set. This is fixed now.
* Also set mLaggedSlaveMode in LoadBalancer as appropriate. Before, it
  was only set in the "too lagged for ChronologyProtector" case.

Change-Id: Ic4dc555cf762653f157df1795f53f3577c1e587a
includes/GlobalFunctions.php
includes/db/LoadBalancer.php