Slow Path Decide Bug Fix
Compare changes
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:
InvokeConsensus
is called, a timeout is set to transition into the slow path by calling TransitionToConsensusSlowPath
.TransitionToConsensusSlowPath
is triggered, we set a per-request boolean flag indicating that we'll no longer try the fast path. We also call HandleSlowPathConsensus
to check to see if we have a quorum.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 by TransitionToConsensusSlowPath
), HandleFastPathConsensus
is called to check for a super quorum. Otherwise, HandleSlowPathConsensus
is called to check for a quorum.