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

Validate command reply modes #320

Closed the-mikedavis closed 1 year ago

the-mikedavis commented 1 year ago

Proposed Changes

Command reply modes (ra_server:command_reply_mode()) were not previously validated. If an old Ra system were sent a reply mode introduced in some new change, the Ra system would never reply or notify the caller. With this change, the caller receives an error tuple reply for the unknown mode.

This is necessary to mitigate the effects of adding new reply modes as in #314 in cases where senders of commands may be running newer Ra versions than a running Ra system.

Types of Changes

What types of changes does your code introduce to this project? Put an x in the boxes that apply

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask on the mailing list. We're here to help! This is simply a reminder of what we are going to look for before merging your code.