apurtell commented on a change in pull request #339: HBASE-22627 Port 
HBASE-22617 (Recovered WAL directories not getting cleaned up) to branch-1
URL: https://github.com/apache/hbase/pull/339#discussion_r297361985
 
 

 ##########
 File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/DeleteTableProcedure.java
 ##########
 @@ -332,6 +331,13 @@ protected static void deleteFromFs(final 
MasterProcedureEnv env,
     if (!fs.delete(tempTableDir, true) && fs.exists(tempTableDir)) {
       throw new IOException("Couldn't delete " + tempTableDir);
     }
+
+    // Delete the directory on wal filesystem
+    FileSystem walFs = mfs.getWALFileSystem();
+    Path tableWALDir = FSUtils.getWALTableDir(env.getMasterConfiguration(), 
tableName);
+    if (walFs.exists(tableWALDir) && !walFs.delete(tableWALDir, true)) {
 
 Review comment:
   @Apache9 included this in the branch-2/master patch, including it here in 
the backport too. 
   
   There are no rollback provisions for an IO exception late in the delete 
procedure, that is true. It's specific to branch-1 because branch-2 and up uses 
the procedure state machine to manage this better. Perhaps we could look at 
this in a follow up issue. 

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