amaliujia commented on a change in pull request #188:
URL: https://github.com/apache/incubator-ratis/pull/188#discussion_r488288904



##########
File path: 
ratis-server/src/main/java/org/apache/ratis/server/impl/RaftServerImpl.java
##########
@@ -1171,6 +1181,26 @@ public InstallSnapshotReplyProto 
installSnapshot(InstallSnapshotRequestProto req
     return reply;
   }
 
+  @Override
+  public PauseReplyProto pause(PauseRequestProto request) throws IOException {
+    assertLifeCycleState(LifeCycle.States.RUNNING);
+    // TODO: should pause() be limited on only working for a follower?
+    if (!lifeCycle.compareAndTransition(RUNNING, PAUSING)) {
+      return PauseReplyProto.newBuilder().setSuccess(false).build();

Review comment:
       I see. I removed the assert check.




----------------------------------------------------------------
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]


Reply via email to