jmsadair / raft

An implementation of the Raft consensus protocol.
MIT License
31 stars 2 forks source link

Read only ops #7

Closed jmsadair closed 11 months ago

jmsadair commented 11 months ago

This adds support for an initial version of lease-based, read-only operations. The client may now specify a lease duration in the options provided to raft if they so choose (the default is the election timeout). Furthermore, tests were added for read-only operations. These tests are not all that comprehensive due to the fact that read-only operations make no guarantee about reading up-to-data, but they demonstrate that they work without errors. More comprehensive testing should be done by creating an example application with raft. Finally, the package documentation was updated to reflect this new feature.