Uploaded image for project: 'Ratis'
  1. Ratis
  2. RATIS-614

Raft leader should use state machine's last applied index for LeaderNotReady exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • None
    • 0.5.0
    • None

    Description

      Currently Raft leader uses the StateMachineUpdater's lastAppliedIndex to determine if leader is ready to take requests. It should rather use StateMachine's lastAppliedTermIndex because it denotes the index till which the transactions have already been completed whereas StateMachineUpdater's lastAppliedIndex denotes the index till which the applyTransaction call has been made to the StateMachine.

      Currently the new leader might not have applied all the transactions of the old term. Any reads served on the new leader can be stale.

      Attachments

        1. RATIS-614.001.patch
          3 kB
          Lokesh Jain
        2. RATIS-614.002.patch
          6 kB
          Lokesh Jain
        3. RATIS-614.003.patch
          6 kB
          Lokesh Jain

        Issue Links

          Activity

            People

              ljain Lokesh Jain
              ljain Lokesh Jain
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: