guihecheng commented on code in PR #3392:
URL: https://github.com/apache/ozone/pull/3392#discussion_r872340765


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/volume/HddsVolume.java:
##########
@@ -214,28 +223,32 @@ public void loadDbStore() throws IOException {
     }
 
     dbParentDir = storageIdDir;
+    dbLoaded.set(true);
+    LOG.info("SchemaV3 db is loaded at {} for volume {}", containerDBPath,
+        getStorageID());
   }
 
   /**
    * Pick a DbVolume for HddsVolume and init db instance.
    * Use the HddsVolume directly if no DbVolume found.
    * @param dbVolumeSet
    */
-  public void createDbStore(MutableVolumeSet dbVolumeSet)
-      throws IOException {
+  public void createDbStore(MutableVolumeSet dbVolumeSet) throws IOException {
     DbVolume chosenDbVolume = null;
     File clusterIdDir;
+    String workingDir = getWorkingDir() == null ? getClusterID() :

Review Comment:
   Oh, I rechecked the code here: `StorageVolumeUtil.checkVolume()`, I think 
the case provided by me is not good.
   With the current logic, a link from "ScmIdDir -> ClusterIdDir" will 
automatically be created with SCMHA finalized within 
`VersionedDatanodeFeatures.ScmHA.upgradeVolumeIfNeeded`, so the working dir 
will always be the "ClusterIdDir" indeed. Sorry for the noise.



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