A DESCRIPTION OF THE REQUEST :
This bug is probably related to 5003595, which deals with stale NFS file handles.
In this case, I have a problem where I have an nfs mounted file system mounted with the 'soft' option, which allows for file accesses to abort prematurely with a timeout error. This is intermittent, depending on the load of the network and the remote server, etc.
In this case, File.exists() returns false, even if the remote file actually exists. It would be nice if instead File.exists() could throw an IOException.
This would have to be added to the api definition for this funciton.
I have been able to verify this behavior, by correlating occurrences of the
false negative result from File.exists() with timeout errors reported to
the /var/log/messages console log file for the system.
To make the api easier to use. It is simply intuitive that if the method returns successfully, without an exception, then it does indeed have the correct result.
EXPECTED VERSUS ACTUAL BEHAVIOR :
If for any reason the call encounters an NFS timeout error, it should through an IOException.
The method returns false, whenever there is an underlying NFS timeout error.
CUSTOMER SUBMITTED WORKAROUND :
The workaround is to routinely retry all calls of File.exists() multiple times, to make sure that a false result is really false. This work around only works in cases where the condition is likely to be spurious, and that
a retry is likely therefore to succeed. This is clearly not a completely
reliable work around.
###@###.### 2004-11-05 06:15:24 GMT