jmsadair / raft

An implementation of the Raft consensus protocol.
MIT License
35 stars 3 forks source link

Read only #42

Closed jmsadair closed 11 months ago

jmsadair commented 11 months ago

This fixes some bugs with the initial implementation of lease-based read-only operations and added support for linearizable read-only operations. The requirements for a lease-based read-only operation to be applied are now:

The requirements for a linearizable read-only operation are:

Linearizable read-only operations are batched - if their are read-only operations that are waiting for a round of heartbeats to be completed, the submitted operation will be queued up and applied with all the other pending operations. The tests for read-only operations are fairly light. My intention is to add more end-to-end test in the future (potentially with Jepsen).

This PR also includes a a fix for a bug that was discovered that allowed the logs of partitioned serves to diverge.