Apache9 commented on a change in pull request #330: HBASE-22617 Recovered WAL 
directories not getting cleaned up
URL: https://github.com/apache/hbase/pull/330#discussion_r296559225
 
 

 ##########
 File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java
 ##########
 @@ -630,19 +630,26 @@ public Path commitDaughterRegion(final RegionInfo 
regionInfo)
   /**
    * Create the region splits directory.
    */
-  public void createSplitsDir() throws IOException {
+  public void createSplitsDir(RegionInfo daughterA, RegionInfo daughterB) 
throws IOException {
     Path splitdir = getSplitsDir();
     if (fs.exists(splitdir)) {
       LOG.info("The " + splitdir + " directory exists.  Hence deleting it to 
recreate it");
       if (!deleteDir(splitdir)) {
-        throw new IOException("Failed deletion of " + splitdir
-            + " before creating them again.");
+        throw new IOException("Failed deletion of " + splitdir + " before 
creating them again.");
       }
     }
     // splitDir doesn't exists now. No need to do an exists() call for it.
     if (!createDir(splitdir)) {
       throw new IOException("Failed create of " + splitdir);
     }
+    Path daughterATmpDir = getSplitsDir(daughterA);
 
 Review comment:
   We have to create the directories for daughter regions here, as it is 
possible that we do not have any  store files to split, which means the 
directories may not be created when we call `commitDaugherRegion`, and then we 
will miss the .regioninfo file and cause TestHbck to fail. Not sure why this 
does not have problem in the past but it is no harm...

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to