SaketaChalamchala commented on code in PR #5964:
URL: https://github.com/apache/ozone/pull/5964#discussion_r1463884092
##########
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:
Makes sense @sumitagrawl. Just to clarify, with the `shouldDelete` fix temp
dir is created and containers are removed only during startup and the other
Container commands should not create/remove and dirs/containers.
The patch LGTM
--
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]