Hi,

I just joined the list, and I'm not sure if it is correct place to ask, but
I do believe that my problem is development issue. I searched archives but
didn't find any reference that it was raised before.

I am creating directory implementation for JDataStore database from Borland.
And I have the following problem: Lucene tries to delete a file that is
still open by some of the InputStreams.

JDataStore has direct support of streams and files, so my stream
implementation does not do too much - it opens the underlying stream and
delegates calls to it. But JDataStore does not allow you to delete file when
there's at least one open stream.

I created a code that monitors all opened streams on the file and closes
them before deleting. And I get another problem: after deleting file there's
some activity on streams that were closed before deleting
object(readInternal(...)). This seems to be a bug.

Also, I modified RAMDirectory and implemented mechanism of registering
number of references on the RAMFile that exist ( +1 when stream is
opened, -1 when stream is closed). In RAMDirectory.deleteFile(String) I
check the number of references and if it >0 throw an java.lang.Error (when
you throw IOException in Directory.deleteFile(String), Lucene seems not to
notice it) and I do get them when running ThreadSafetyTest (I had to make
small modification in order to use one instance of directory and not create
them when needed).

Should I post my changes that show the problem here?

Thank you in advance.

Best regards,
Roman Rokytskyy


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to