Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • tapir tapir
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 8
    • Issues 8
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • syslab
  • tapirtapir
  • Merge requests
  • !5

Slow Path Decide Bug Fix

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Michael Whittaker requested to merge majority_decide into master Mar 06, 2018
  • Overview 1
  • Commits 5
  • Changes 2

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 calling TransitionToConsensusSlowPath.
  • When 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.
  • 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 by TransitionToConsensusSlowPath), HandleFastPathConsensus is called to check for a super quorum. Otherwise, HandleSlowPathConsensus is called to check for a quorum.
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: majority_decide