Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-23631

dur_remove_old_journals.js needs to be robust to delete file race

    • Fully Compatible
    • ALL
    • Platforms 13 (04/22/16)
    • 0

      During listFiles in the shell, if a file is being deleted as it is being enumerated via the Windows Find File or other file api, the api call may fail with ACCESS_DENIED if the file is opened for delete. Since ACCESS_DENIED is a generic error message for a lack of permissions, we cannot simply retry at the lowest level for this error as the user may also simply not have permission to the file according to the DACL on the file.

      DeleteFile

      The DeleteFile function marks a file for deletion on close. Therefore, the file deletion does not occur until the last handle to the file is closed. Subsequent calls to CreateFile to open the file fail with ERROR_ACCESS_DENIED.

            Assignee:
            mark.benvenuto@mongodb.com Mark Benvenuto
            Reporter:
            mark.benvenuto@mongodb.com Mark Benvenuto
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: