gen_leader receiving 2 handle_DOWN messages when the leader dies in a 2-process setup
Fri Jan 21 19:23:21 CET 2011
I'm using the latest gen_leader from
When the number of candidates is down to 2, 1 candidate and 1 leader,
and the leader dies, the last candidate receives 2 handle_DOWN
messages with the same Node parameter.
I have tried this starting with 3 candidates or 2 candidates. In
either case, killing the leader when there are 2 candidates alive will
generate 2 handle_DOWN callbacks on the survivor with the same Node
The callback order on the last node alive is:
elected(state, Elected, Node = undefined)
Is this expected behavior? If so, what is the reason for 2
handle_DOWN callbacks? If not, I'll be happy to provide a lot more
details on what I'm seeing.
More information about the erlang-questions