-
-
Notifications
You must be signed in to change notification settings - Fork 128
Description
Describe the bug
The tests for leader conflicts do not account for out of order message delivery to multiple nodes.
Generally speaking there does not appear to be any guarantee that nodes in the cluster will agree on who the leader is. The guarantee appears to be that each node will believe there is exactly one leader. As far as I can tell there is no enforcement of leadership as well. The client can ask any node for an answer and room assistant will respond, even if it's not the leader. It's also not required that the cluster itself produce a single coherent leader.
To reproduce
add and remove nodes quickly from the cluster. Eventually it will get out of sync. Restoring power after a power outage could create this condition.
Additional context
Paxos or raft or any other distributed consensus algorithm would be required to ensure that nodes agree on who the leader is.