On Thu, 2008-10-23 at 11:46 +0100, Russel Winder wrote: > Current guess is that this is a timing problem -- the new code now > sometimes works on my P4 but not on the twin-quad-xeon or the Mac MIni. > > Worrying about the buildSrc problem initially: I wonder if the problem > is that the directory buildSrc/tmpTest/root is being deleted and then > buildSrc/tmpTest is being delete and the speed with which the Java code > executes is too quick for NFS, so there is a .nfs file in > buildSrc/tmpTest at the point at which the delete happens. > > I tried putting in a Thread.sleep ( 1000 ) into GradleUtil.deleteDir but > it made no difference. Actually I put a System.err.println in there and > nothing was printed out so either all IO is being redirected or it never > got into that method.
OK having actually installed the right Gradle, it appears that inserting a delay of 100ms before each delete cures the problem, so it appears it might be a speed/timing/synchronization/sequencing problem. So the upshot is that you cannot delete a directory and then immediately delete its parent directory when using an NFS mounted filestore without introducing a small time period to replace "immediately". On the one hand introducing the Thread.sleep seems a complete travesty since there is no need for it, on the other hand without it anyone using a fast processor and NFS discs is going to be shafted. I think adding the delay into the general function is the wrong thing to do since it slows things down where they don't need slowing down, adding a small delay in the tests themselves seems like the right thing to do since that is where the context is. Does this seem reasonable. -- Russel. ==================================================== Dr Russel Winder Partner Concertant LLP t: +44 20 7585 2200, +44 20 7193 9203 41 Buckmaster Road, f: +44 8700 516 084 London SW11 1EN, UK. m: +44 7770 465 077
signature.asc
Description: This is a digitally signed message part
