GlenGeng opened a new pull request #2224: URL: https://github.com/apache/ozone/pull/2224
## What changes were proposed in this pull request? 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. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-5173 ## How was this patch tested? CI -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
