Our app running on client server A and creates a file on the server 2008 R2 file-server 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 is testing a disaster situation and powering off 'server A' and leaving it off. They're reporting that our app running on 'server B' using the same filename and the same code fragment above fails (ie the file continues to exist) for at least 15 minutes until, we believe, they browse to folder containing the file in Windows Explorer at which point the file is deleted automatically.
Is anyone aware of how this is supposed to behave in this situation, where the creating server has gone away, should the handles be released and the file removed automatically? And why does looking at the file cause it to delete?
Interestingly, on another supposedly similar setup the issue does not occur.