lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Carlson <carl...@bookandhammer.com>
Subject Re: InputStream handling problem
Date Mon, 22 Apr 2002 14:37:17 GMT
Thanks for the work Roman,

Please send a test case, that will be really helpful.

--Peter

On 4/22/02 7:00 AM, "Roman Rokytskyy" <rrokytskyy@yahoo.co.uk> wrote:

> 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:lucene-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:lucene-dev-help@jakarta.apache.org>
> 
> 


--
To unsubscribe, e-mail:   <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-dev-help@jakarta.apache.org>


Mime
View raw message