Improve EtcdConfig fallback logic
authorAaron Schulz <aschulz@wikimedia.org>
Fri, 28 Apr 2017 20:56:20 +0000 (13:56 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Sat, 29 Apr 2017 02:43:39 +0000 (02:43 +0000)
commit7fccf0ef9c2d8b19e21fc9fbb44ca924ef99b815
tree584a72a253b04ba22049508a1c7ddd719ea0c15b
parent2dad6ad2d37935a53a1143333fce15c740de05ac
Improve EtcdConfig fallback logic

If the cache is stale and the lock keeps being acquired, but the re-fetch
fails each time, the method would end up failing after the timeout was
reached. Instead, use the stale cache if available.

Change-Id: Ieafc9de17e6c60d8eea7b937923b4ad548e99be8
includes/config/EtcdConfig.php