Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Demote immediately if failed to update leader lock
If the Etcd node partitioned from rest of the cluster it is still possible to read from it (though it returns some stale information), but it is not possible to write into it. Previously Patroni was trying to fetch the new cluster view from DCS in order to figure out is it still the leader or not and Etcd is always returning stale info where the node still owns the leader key, but with negative TTL. This weird bug clearly shows how dangerous premature optimization is.
- Loading branch information