sadanand48 commented on code in PR #5222:
URL: https://github.com/apache/ozone/pull/5222#discussion_r1306939073


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java:
##########
@@ -1429,6 +1430,16 @@ private void initializeRatisDirs(OzoneConfiguration 
conf) throws IOException {
       }
       OmUtils.createOMDir(omRatisDirectory);
 
+      String omStorageDir = conf.get(OMConfigKeys.OZONE_OM_RATIS_STORAGE_DIR);
+      String scmStorageDir =
+          conf.get(ScmConfigKeys.OZONE_SCM_HA_RATIS_STORAGE_DIR);
+      if (omStorageDir.equals(scmStorageDir)) {

Review Comment:
   actually there is one problem here, not very practically likely but it still 
exists.
   If I set omStorageDir = defaultPath of scm , then we won't throw the 
exception here as the scmStorageDir is not defined but actually they would be 
same.
   The right way to do this would be to 
   ``` java
   omStorageDir = OzoneManagerRatisUtils.getOMRatisDirectory(conf);
   scmStorageDir = RatisUtil.getRatisStorageDir(conf); 
   ```
   and then compare.
   
   



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

Reply via email to