SaketaChalamchala commented on code in PR #5964:
URL: https://github.com/apache/ozone/pull/5964#discussion_r1458123551
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/ozoneimpl/ContainerReader.java:
##########
@@ -148,7 +148,18 @@ public void readVolume(File hddsVolumeRootDir) {
LOG.info("Start to verify containers on volume {}", hddsVolumeRootDir);
File currentDir = new File(idDir, Storage.STORAGE_DIR_CURRENT);
File[] containerTopDirs = currentDir.listFiles();
- if (containerTopDirs != null) {
+ if (containerTopDirs != null && containerTopDirs.length > 0) {
+ try {
+ // idDir is working directory having data
+ // and volume is initialized with temp path
+ hddsVolume.createTmpDirs(idDir.getName());
Review Comment:
ContainerReader thread is also run when ContainerCommands like `ozone debug
container inspect|info|export|list` commands. Should we only check the volume
and create tmp dirs during DN startup and not when container commands are run
after the startup?
In that case, OzoneContainer.buildContainerSet() might be an ideal place to
make this change.
--
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]