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:
   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. 
   
   I added this at the very tail of the procedure so if there is an IO 
exception here at least it did not interfere with the deletion of the table 
directories. However if there is an IO exception deleting the table 
directories, we don't reach this code. We have this concern with the master 
procedures in branch-1 in a number of places. 

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