Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-7465

CleanerChore shouldn't leak IOException for failed delete of non-empty directory

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 0.94.4, 0.95.2
    • None
    • master
    • 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

      Attachments

        1. hbase-7465-v0.patch
          6 kB
          Jesse Yates

        Activity

          People

            Unassigned Unassigned
            jesse_yates Jesse Yates
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: