Using etcd-io/raft library

09-async-storage-write

Documentation for etcd-io/raft package describes the Asynchronous Storage Writes feature:

...an alternate interface for local storage writes that can provide better performance in the presence of high proposal concurrency by minimizing interference between proposals...

Independent of performance benefits, I find this approach leads to a cleaner separation of code handling "appended" and "committed" entries. We're following the skeleton of the new "state machine handling loop", as provided in the documentation: 09-async-storage-write/the_test.go.

Some changes that were necessary to make this work:

Note:

The test disables the simulation of failed message delivery (introduced in 08-running-cluster, because sometimes a message containing the ConfChange entry isn't delivered and the new node never joins the cluster.

To re-enable message delivery failures, the test would need to detect that a configuration change proposal was lost and retry.

Next: 10-separate-process.