Hi!
After few ours of debugging, logging and VM hacking we figured out what
causes situation described in my previous message (index corruption because
of not removed files):
http://marc.theaimsgroup.com/?l=xindice-users&m=101342784112788&w=2
Apparently it seems that there are 2 file descriptors opened
(RandomAccessFile objects) for newly created collection files (*.tbl).
We tracked that it is done within Collection's setConfig method line
188-192, where the filer object is first create()d if not exists, and then
open()ed. It looks good, but within Paged class implementation both create()
and open() functions create new RandomAccessFile instances. Moreover
create() method despite opening file, doesn't set opened flag what prevents
from using close() method.
I think it is now for you to decide which solution to use. We don't know the
sources very well, but we propose:
1. Fix Collection.java(188-) setConfig to
if ( !filer.exists() )
filer.create();
+ else // else added
filer.open();
but it requires to set opened flag within Paged's create() method
or
2. Close file in the end of create() (caused some exception...).
or
3. close file after create() within setConfig()
After those modifications collections were correctly removed from disk, no
files were left locked.
I'm really amazed it worked sometimes (maybe GC swept both file objects).
We're waiting for official CVS update.
regards
Krzysztof Kowalczykiewicz, POLAND
Dawid Weiss, POLAND