Personal tools
You are here: Home Members TristanKing Tristan's blog Archive 2006 February 09 Problem with polling for new files

Problem with polling for new files

There is a problem I've encounted while running a few tests with my Directory Polling actor.

If a file is being written to--for example, a large data file is being copied to the data directory--when the directory is checked for new files, the yet-to-be-complete data file will be flagged as a new file, and passed on to the other actors.

This causes a big problem, since the file then being written to SRB etc may not be complete.

Solution may be to check each file every second until the lastModified value has remained the same for a number of iterations. However i don't like this solution, as it add's a constraint that each file takes at least n seconds to process, although this wouldn't be a problem for large data sets that aren't produced rapidly.


Posted by TristanKing on 2006-02-09 11:12

Trackback

The URI to TrackBack this entry is: #


dart@dart.edu.au | DART Project Office, Monash University, Victoria 3800, Australia; Telephone +61 3 9905 4187; Facsimile +61 3 9905 3024