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
798 stars 93 forks source link

Emit the new `local_query` tuple only if query options are set #451

Open dumbbell opened 5 days ago

dumbbell commented 5 days ago

Why

Using the new tuple isn't compatible with older versions of Ra. This breaks local/leader queries if there are Ra members running an old version.

How

We don't need the new {local_query, QueryFun, Options} tuple if there is no options. We can use the old {local_query, QueryFun} in this case and keep the compatibility.