gvprathyusha6 commented on code in PR #7406:
URL: https://github.com/apache/hbase/pull/7406#discussion_r2486956177


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java:
##########
@@ -848,6 +851,14 @@ private void writeRegionInfoOnFilesystem(final byte[] 
regionInfoContent, final b
         CommonFSUtils.delete(fs, tmpPath, true);
       }
 
+      // Check parent (region) directory exists first to maintain HBASE-29662 
protection
+      if (!fs.exists(getRegionDir())) {
+        throw new IOException("Region directory does not exist: " + 
getRegionDir());
+      }
+      if (!fs.exists(getTempDir())) {
+        fs.mkdirs(getTempDir());

Review Comment:
   this was created previously as part of recursion in FS while creating file, 
now that I removed it to and now we dont just blindly create all the 
directories that are present in path, we would need to create tmp directory 
explicitly  



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

Reply via email to