Apache9 edited a comment on pull request #1826:
URL: https://github.com/apache/hbase/pull/1826#issuecomment-638530854


   And I got the reason why there is a currentRunningState field. We will call 
setNextState after scheduling sub procedures, so when updating progress, if we 
just use the state machine state by calling getCurrentState, we will set the 
message in the TaskMonitor to the next state, which is a bit confusing to users.
   
   So I think we could add another flag to updateProgress, to indicate whether 
the procedure is complete, and when calling after excuting the 
SERVER_CRASH_FINISH, we set this flag to true to let the method complete the 
procedure in the TaskMonitor.
   
   And also, in deserialization method, we could check the 'ProcedureState'(not 
the state of the state machine), if it is SUCCESS or FAILED, then we just skip 
calling updateProgress, so it will not have stale SCPs.
   
   Thanks.


----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to