Closed requested to merge majority_decide into master
Previously, the decide function was being called on the slow path whether or not we had a majority of responses from the replicas (see #14 for more details; I also confirmed this by hand by running the lock server with some extra debug logging). This PR fixes that bug. Here's a summary of how the code works now:
InvokeConsensusis called, a timeout is set to transition into the slow path by calling
TransitionToConsensusSlowPathis triggered, we set a per-request boolean flag indicating that we'll no longer try the fast path. We also call
HandleSlowPathConsensusto check to see if we have a quorum.
HandleConsensusReplyis called, a replica reply is added to the set of replies. Then, if we're on the fast path (indicated by the per-request boolean flag set by
HandleFastPathConsensusis called to check for a super quorum. Otherwise,
HandleSlowPathConsensusis called to check for a quorum.