neo4j/neo4j — pull request #2249 by digitalstain (2014-04-09 10:59:02+00:00)
Title: Fixes issue with state bookkeeping for reporting instance role

There are some cases where an instance can switch from MASTER to
SLAVE without broadcasting the masterIsUnavailable event. In this
case we cobble the state kept in ClusterMembers and can end up
reporting the wrong role. This fix introduces knowledge of
the mutual exclusion of MASTER and SLAVE roles in ClusterMember,
ensuring that when one is received, the other is properly
removed.