You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2022/01/03 07:38:00 UTC

[GitHub] [ozone] adoroszlai commented on a change in pull request #2953: HDDS-6141. terminate om if statemachine is shut down by ratis

adoroszlai commented on a change in pull request #2953:
URL: https://github.com/apache/ozone/pull/2953#discussion_r777324619



##########
File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
##########
@@ -1926,7 +1926,6 @@ public void stop() {
       if (omSnapshotProvider != null) {
         omSnapshotProvider.stop();
       }
-      omState = State.STOPPED;

Review comment:
       If we remove state transition, `stop()` may perform its actions multiple times.  I think a better way to ensure system exit would be moving the `exitSystem()` call outside of the `if` in `shutdown` (both methods):
   
   https://github.com/apache/ozone/blob/e6179c1ec6d77a46687c513ab63b81d7c62e9796/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java#L782-L794




-- 
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-unsubscribe@ozone.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org