db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel John Debrunner <...@apache.org>
Subject Re: DERBY-2636/DERBY-3068
Date Wed, 09 Jan 2008 22:29:41 GMT
Myrna van Lunteren wrote:
> Hi,
> I see fairly regular failures caused by a failure in cleaning up
> extinout/t1.dat in the nightly tests run at IBM, see for example:
> http://people.apache.org/~fuzzylogic/derby_test_results/main/derbymain/testSummary-609084.html
> I am wondering if anyone has any suggestions on how to debug or even
> solve these...?

I think these are caused by failure in the Derby code to close open 
files after a failure in export and import.

One possible factor in making the problems harder to debug is the method 
SupportFilesSetup.deleteFile. If this method fails to delete the file no 
  error will be reported. This means that a problem may be detected much 
later than when it actually occurred. I changed the code to be the 
following and hit an exception in a different place, which lead to it 
looking like the import code didn't close the file upon a failure.

     public static void deleteFile(final String fileName)
             (new java.security.PrivilegedAction() {

                     public Object run() {
                     	File delFile = new File(fileName);
                     	if (!delFile.exists())
                     		return null;
                         return null;

The point here is that the purpose of the method is to actually delete 
the file, thus if it fails to do this then it's a problem and needs to 
be flagged right away (the assertTrue). Not flagging the failure to 
delete (the old code) means the environment is not being set up 
correctly for code following the call, potentially causing that to fail 
when really it may have no issues.


View raw message