GlenGeng commented on pull request #2184:
URL: https://github.com/apache/ozone/pull/2184#issuecomment-827405218


   @bharatviswa504 After installSnapshot, the lifecycle of follower's 
SCMStateMachine is in PAUSED state. 
   
   ```
             
stateMachine.followerEvent().notifyInstallSnapshotFromLeader(roleInfoProto, 
firstAvailableLogTermIndex)
                 .whenComplete((reply, exception) -> {
                   if (exception != null) {
                     LOG.warn("{}: Failed to notify StateMachine to 
InstallSnapshot. Exception: {}",
                         getMemberId(), exception.getMessage());
                     
inProgressInstallSnapshotRequest.compareAndSet(firstAvailableLogTermIndex, 
null);
                     return;
                   }
   
                   if (reply != null) {
                     LOG.info("{}: StateMachine successfully installed snapshot 
index {}. Reloading the StateMachine.",
                         getMemberId(), reply.getIndex());
                     stateMachine.pause();
                     state.updateInstalledSnapshotIndex(reply);
                     state.reloadStateMachine(reply.getIndex());
                   }
                   
inProgressInstallSnapshotRequest.compareAndSet(firstAvailableLogTermIndex, 
null);
                 });
           } 
   ```
   
   The reason is, after `notifyInstallSnapshotFromLeader ` is called, ratis 
call ` stateMachine.pause();` again. 
   I am checking it.


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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to