I know very little about DFS filesystems but have come across an issue with one of our deployments.
Our application writes files to a designated location, closes them, and then writes a record into the database. Another part of the application picks up these DB records and reads the file that was previous written.
In some cases the reader is getting a "file not found" and it fails. Restarting it without touching anything else and it finds the file correctly and everything is fine.
I believe I have ruled out a problem with our application as the file is definitely flushed/closed before the database record is created.
Therefore I'm led to believe that the OS or filesystem is delaying the file write internally so it isn't immediately available.
The filesystem in question is Windows 2003 SP2 DFS. Is this a likely scenario with this DFS? If so is it possible to switch it into some sort of write-through/no caching policy to ensure the files are written promptly?