neo4j/neo4j — pull request #2846 by digitalstain (2014-08-13 13:18:48+00:00)
Title: Ensures that incompatible roles are removed from cluster info on availability events

Given that when an instance fails it does not broadcast unavailability events, it may
happen that an instance failing and rejoining can keep the backup role. Also, an
instance failing should have its roles removed, as they are no longer relevant. This
commit does so by checking in ClusterMember for incompatible roles and removing them.
Additionally, it removes all roles from an instance when a failure event is received
for it.
Adds tests for these conditions on the ClusterMembers level.