rabbitmq / ra

A Raft implementation for Erlang and Elixir that strives to be efficient and make it easier to use multiple Raft clusters in a single system.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

timeout sideeffect is lost when leader dies

RoadRunnr opened this issue · comments

The timeout sideeffect is only processed in the Erlang node that is the leader at the time of issuing the sideeffect. If the leader node dies between returning the timeout sideeffect and the actual timeout moment, the the timeout command is not executed.

IMHO the new leader should execute the timeout in this case.

This means the new leader would have to have to be aware of all side effects previously issued by the original leader. That would be a massive can of worms to open. More idempotent, "recovering" state machines is a much better idea where you control everything that's going on.