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
InvokeConsensus
is called, a timeout is set to transition into the slow path by callingTransitionToConsensusSlowPath
. - When
TransitionToConsensusSlowPath
is triggered, we set a per-request boolean flag indicating that we'll no longer try the fast path. We also callHandleSlowPathConsensus
to check to see if we have a quorum. - When
HandleConsensusReply
is 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
),HandleFastPathConsensus
is called to check for a super quorum. Otherwise,HandleSlowPathConsensus
is called to check for a quorum.