Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
0.94.4, 0.95.2
-
None
-
None
Description
CleanerChore has the following lines:
// if all the children have been deleted, then we should try to delete this directory. However, // don't do so recursively so we don't delete files that have been added since we checked. return canDeleteThis ? fs.delete(toCheck, false) : false;
has a race condition where the directory can have a file added underneath of it between being determined 'ok to delete' and not. As the comment mentions, we don't do a recursive delete to avoid deleting those files. However, the non-recursive delete of the directory throws an IOException.
This is from http://search-hadoop.com/m/MUMTb13obDf2/CleanerChore+exception/v=plain