CCM does not handle partitions merge well so far. Here is one way to handle it.
CCM states are categorized as two classes:
1) CCM_STATE_NONE, CCM_STATE_VERSION_REQUEST
If a node is in first class, it is not considered as part of the cluster yet and it will not join the cluster until a leader is elected.
2) other states.
If the joined node is in class 1) state, it is a new one, otherwise it is from another partition.
CCM needs to be able to communicate with each other with info that it is in class 1) or class 2) states
We received a node join message:
if (fresh_new_join){ /*do nothing *the fresh new joined node will initiate the join protocol */ }else { /* it is partition merge*/ send out joining message to start join protocol