You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@celeborn.apache.org by GitBox <gi...@apache.org> on 2022/12/01 04:09:28 UTC

[GitHub] [incubator-celeborn] waitinfuture commented on a diff in pull request #1033: [CELEBORN-94][BUG] StateMachine should implement pause to change status

waitinfuture commented on code in PR #1033:
URL: https://github.com/apache/incubator-celeborn/pull/1033#discussion_r1036671451


##########
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?



-- 
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: dev-unsubscribe@celeborn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org