shahrs87 edited a comment on pull request #3862:
URL: https://github.com/apache/hbase/pull/3862#issuecomment-975538500


   > The problem here is that, why a crashed region server could return zero 
here? Why it does not return a non zero value?
   
   I have added all the details in HBASE-26468 but adding here for the context. 
Within RS (atleast in branch-1.6) there is a subtle difference when RS is 
aborted vs when it is stopped. In this particular case, the RS was stopped.  In 
HRegionServerCommandLine, if a server is aborted, then it throws RTE which in 
turns converts into System.exit(1). But if RS is stopped, it returns return 
code of 0. Sure we can make changes to this code to return -1 when RS is 
stopped so it behaves exactly alike when it is aborted. But there will be bugs 
in future when RS will exit with return code 0 when it should have return with 
non zero exit code. 
   
   > A zero return value means a normal shutdown, so here we want all the 
threads clean themselves up and then exit gracefully.
   
   We can always wait for few seconds for threads to clean themselves up if RS 
exits with 0 return code. But we shouldn't wait infinitely for threads to clean 
themselves up. 
   
   > Sorry for sticking on the behavior here, the modification is pretty simple 
but it is very foundamental...
   
   Don't be sorry. It is a good discussion and we should always try to 
understand the implications before we make any fundamental changes.
   @Apache9  Let me know what you think ?


-- 
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: issues-unsubscr...@hbase.apache.org

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


Reply via email to