Our application runs on client server A and creates a file on the server server 2008 R2 using:
CreateFile(LockFileName,
GENERIC_READ or GENERIC_WRITE,
FILE_SHARE_READ, nil,
CREATE_ALWAYS,
FILE_FLAG_WRITE_THROUGH or FILE_FLAG_DELETE_ON_CLOSE,
0);
The client tests the distress situation and turns off "server A" and leaves it. They report that our application running on “server B” using the same file name and the same code fragment fails (i.e. the file continues to exist) for at least 15 minutes, until, in our opinion , they will not go to the folder containing the file in Windows Explorer, after which the file will be deleted automatically.
Does anyone know how this should behave in this situation, when the creating server is gone, if the handles are released, and the file is deleted automatically? And why does a file search result in its deletion?
Interestingly, on another supposedly similar installation, the problem does not arise.
source
share