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

Cluster restart question #274

Closed mbj4668 closed 2 years ago

mbj4668 commented 2 years ago

I have a question about what can be expected after a cluster restart.

I have a cluster with three nodes, and the machine is a simple k-v store implemented as a map, with perhaps ~100 elements. Everything is stable, and I stop all three nodes. Then they are all restarted. Some short time after ra:restart_server(Name, {Module, node()}) has returned ok, I do a leader_query to read a value that I know was in the kv store before the restart, but at this time it is not there (I get a proper no_such_key return value from my callback module, not an error). Then after timer:sleep(1000) I try the same leader_query, and now the item is there.

So my question is if this is expected?