AngersZhuuuu opened a new pull request, #1033: URL: https://github.com/apache/incubator-celeborn/pull/1033
### What changes were proposed in this pull request? <img width="1091" alt="截屏2022-11-30 下午8 25 13" src="https://user-images.githubusercontent.com/46485123/204795829-eaa7e2a7-8051-4b8b-a907-5a795b526043.png"> After install snapshot, will notify StateMachineUpdate to reload <img width="915" alt="截屏2022-11-30 下午8 26 12" src="https://user-images.githubusercontent.com/46485123/204796010-7c0b3539-6ca3-4fb8-8841-e8cd8fa293a2.png"> In StateMachineUpdater `reload()` will check StateMachine status should be PAUSED, then reinitialize StateMachine with latest snapshot <img width="1077" alt="截屏2022-11-30 下午8 26 39" src="https://user-images.githubusercontent.com/46485123/204796186-90775a71-363f-4597-990c-208501a557c9.png"> In ServerState.installSnapshot method there will call StateMachine's `pause()` ``` void installSnapshot(InstallSnapshotRequestProto request) throws IOException { // TODO: verify that we need to install the snapshot StateMachine sm = server.getStateMachine(); sm.pause(); // pause the SM to prepare for install snapshot snapshotManager.installSnapshot(sm, request); updateInstalledSnapshotIndex(TermIndex.valueOf(request.getSnapshotChunk().getTermIndex())); } ``` We should implement `pause()` in StateMachine and change the status ### Why are the changes needed? <!-- Please clarify why the changes are needed. For instance, 1. If you propose a new API, clarify the use case for a new API. 2. If you fix a bug, you can clarify why it is a bug. --> ### What are the items that need reviewer attention? ### Related issues. ### Related pull requests. ### How was this patch tested? /cc @related-reviewer /assign @main-reviewer -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
