boundary/ordasity — comment on commit caec75abe2654762b5b78cc4b551ef773598a4f3
File: src/main/scala/com/boundary/ordasity/Cluster.scala line 718
By cb372:

Maybe I'm misunderstanding this, but it seems that this change has broken the behaviour of the setState() method, with dire effects on the rebalancing logic.

Before this commit, line 718 was writing the node's **new** state to ZK. Thus, for example after a node has started up, its status is marked as "Started" in ZK. This makes sense to me.

With this commit, the method writes the node's **old** state to ZK, then updates the state in memory. e.g. when the node finishes starting up, it marks its status as "Fresh" in ZK, which is incorrect.

Because of this, all nodes are discounted by `activeNodeSize()` during a rebalance (because all nodes appear to be still in the "Fresh" state, even though they are actually running). So rebalancing has no effect on the state of the cluster.