errose28 commented on code in PR #4138:
URL: https://github.com/apache/ozone/pull/4138#discussion_r1066312898
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java:
##########
@@ -454,6 +454,11 @@ private OzoneManager(OzoneConfiguration conf,
StartupOption startupOption)
this.omNodeDetails = omhaNodeDetails.getLocalNodeDetails();
omStorage = new OMStorage(conf);
+ // validate if the stored one is the same we get in the OMNodeDetails
+ // if not, fails the start. If the VERSION file does not contain the node
+ // id yet, it stores it to the VERSION file and skips validation for the
+ // that case.
Review Comment:
```suggestion
// validate if the stored node ID is the same we get in the OMNodeDetails
// if not, fails to start. If the VERSION file is from an older Ozone
version and does not contain the node
// ID yet, it stores it to the VERSION file and skips validation.
```
Minor suggestion here to clarify why the version file may not have the node
ID and we need to write it. If you just read the code after this change, it
looks like the node ID should show up on init and the constructor can assume it
is already there. It is not obvious that the node ID used to not be written in
init.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]