AngersZhuuuu commented on code in PR #1033:
URL:
https://github.com/apache/incubator-celeborn/pull/1033#discussion_r1036673800
##########
master/src/main/java/org/apache/celeborn/service/deploy/master/clustermeta/ha/StateMachine.java:
##########
@@ -189,8 +191,16 @@ public void initialize(RaftServer server, RaftGroupId id,
RaftStorage raftStorag
@Override
public void reinitialize() throws IOException {
LOG.info("Reinitializing state machine.");
+ getLifeCycle().compareAndTransition(PAUSED, STARTING);
storage.loadLatestSnapshot();
loadSnapshot(storage.getLatestSnapshot());
+ getLifeCycle().compareAndTransition(STARTING, RUNNING);
+ }
+
+ @Override
+ public void pause() {
Review Comment:
> why not just change from running to paused?
<img width="595" alt="截屏2022-12-01 下午12 13 54"
src="https://user-images.githubusercontent.com/46485123/204964366-1aa73838-fa78-4633-b693-95cb2c37dbb6.png">
--
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]