Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-2823 SCM HA Support
  3. HDDS-5173

Divide snapshot related work into notifyInstallSnapshotFromLeader and reinitialize for SCMStateMachine.

    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.2.0
    • Component/s: None

      Description

      As mentioned in https://issues.apache.org/jira/browse/RATIS-1370

      During notifyInstallSnapshotFromLeader, StateMachineUpdater may call applyTransactions when StateMachine is in PAUSED state.

      Just divide snapshot related work into notifyInstallSnapshotFromLeader and reinitialize for SCMStateMachine.

      During notifyInstallSnapshotFromLeader, SCM just downloads snapshot but not modify StateMachine, since StateMachineUpdater is in RUNNING state, may call applyTransactions during this period.

      During reinitialize, SCM can safely reload the StateMachine, such as rocksdb and in-memory state. During this period, StateMachineUpdater is in RELOAD state, thus there will be no contention between SCM and StateMachineUpdater.

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                glengeng Glen Geng
                Reporter:
                glengeng Glen Geng
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: