neo4j/neo4j — pull request #2767 by lutovich (2014-07-30 14:41:14+00:00)
Title: Fix for 'Cluster is not operational' issue

This PR fixes the problem with master election when ClusterConfiguration and HeartbeatContext appears to be in incoherent state. In such state failed machine was already not present in configuration but still present in heartbeat. This led to lack of quorum and failure of new election. HeartbeatLeftListener will now explicitly remove failed instance from heartbeat.
Fixed unsynchronized execute(Runnable)/drain() in DelayedDirectExecutor, which is used from multiple threads.