neo4j/neo4j — pull request #2850 by thobe (2014-08-14 09:06:01+00:00)
Title: Ensures that incompatible roles are removed from cluster info on availability events

Supersedes #2846.

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.