-
Type: Bug
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: 5.1 Required
-
Component/s: Concurrency
-
ALL
-
Security 2021-09-06
-
40
Windows may not allow for immediate file deletion thus causing an exception. An example of this is in BF-13075 and BFG-858391. Specific error is in src/mongo/shell/shell_utils_launcher.cpp in ResetDbpath, where Windows exceptions are handled by sleep followed by retry. This method reduces number of failures, but does not fully eliminate them
Per https://docs.microsoft.com/en-us/windows/win32/fileio/closing-and-deleting-files , there is an alternative way of deleting an object: it has to be renamed and then a DeleteFile function invoked ("The DeleteFile function marks a file for deletion on close"). This would produce an empty directory, and the old one would be eventually gone
Before starting work on this ticket, need to determine if this could be done using standard c++ or boost, whithout expressly invoking win32 functionality.