lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <...@thetaphi.de>
Subject RE: Interrupting IndexWriter#close(true)
Date Sun, 22 Jul 2012 17:36:42 GMT
I think in tests we should always wait for the merges on close, so don't
pass true. That's the easiest to fix, would it be too complicated to make
the crazy tests I disabled and you reenabled silent by this?

If the code inside Solr uses this IW#close(true), we should add some other
workaround, but that is a different story.

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de


> -----Original Message-----
> From: Mark Miller [mailto:markrmiller@gmail.com]
> Sent: Sunday, July 22, 2012 7:16 PM
> To: dev@lucene.apache.org
> Subject: Interrupting IndexWriter#close(true)
> 
> Currently, interrupting IndexWriter#close(true) - which should wait for
> background merges to finish - causes #close to return while background
> merges are still running.
> 
> There is a test that fails occasionally because of this. This is because
it's using
> logic like this:
> 
> try {
>   IndexWriter#close(true)
> } finally {
>   Directory#close();
> }
> 
> Background merges will still try and use that directory though. Part of
wanting
> to wait for them to finish is so that you know when it's safe to close the
> directory.
> 
> So what is the proper way to address this?
> 
> Merge threads that throw an exception - even if it's harmless - will fail
the test
> framework.
> 
> Should Lucene act differently? Should #close not be interruptible? Should
it
> make sure merge threads are killed before it bails on interrupt?
> 
> Or should the test framework be able to ignore some background thread
> exceptions?
> 
> Or is there some option I'm missing?
> 
> - Mark Miller
> lucidimagination.com
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional
> commands, e-mail: dev-help@lucene.apache.org


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


Mime
View raw message