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:15:24 UTC
[GitHub] [incubator-celeborn] AngersZhuuuu commented on a diff in pull request #1033: [CELEBORN-94][BUG] StateMachine should implement pause to change status
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: dev-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org