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.
Other
813 stars 96 forks source link

down commands can overtake low priority messages #393

Closed kjnilsson closed 1 year ago

kjnilsson commented 1 year ago

Describe the bug

If a process that sends low priority commands suddenly exits the down command can get added before any pending low priority commands are added to the log resulting in more complex behaviour for the state machine to handle which are at odds with standard erlang monitor semantics.

Reproduction steps

1. 2. 3. ...

Expected behavior

down commands should be added to the log after any pending low priority commands from the same process so that when the state machine receives the down it knows it won't receive any further commands.

Additional context

No response