Slow Path Decide Bug Fix
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:
- When
InvokeConsensusis called, a timeout is set to transition into the slow path by callingTransitionToConsensusSlowPath. - When
TransitionToConsensusSlowPathis triggered, we set a per-request boolean flag indicating that we'll no longer try the fast path. We also callHandleSlowPathConsensusto check to see if we have a quorum. - When
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 byTransitionToConsensusSlowPath),HandleFastPathConsensusis called to check for a super quorum. Otherwise,HandleSlowPathConsensusis called to check for a quorum.