Optimization: When possible, bail out early when quorum achieved
The beating heart of all consensus based distributed algorithms is to scatter a computation across multiple nodes, then to gather their results, then to evaluate whether quorum is achieved.
In some cases, quorum requires gathering all of the nodes' results (e.g., interrogating all nodes for a maximum value for a variable).
But in other cases, quorum requires gathering only n // 2 + 1
nodes' results (e.g., figuring out if > 50% of nodes believe that I'm the owner of a lock).
Implement the logic to "bail out" early when possible, in the latter case.
What's Changed
- When possible, bail out early when quorum achieved by @brainix in #286
- Bump version number by @brainix in #287
Full Changelog: v1.0.6...v1.0.7